From ef54d315e8b5472580501b25fc640aba62e98d41 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Dec 2012 00:30:58 -0500 Subject: [PATCH] * lisp/progmodes/octave-mod.el (octave-mark-block): Move out of tokens and fix open-paren-like token test. Fixes: debbugs:12785 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/octave-mod.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fc65d2bb3..5712dd9f8c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-12-05 Stefan Monnier + + * progmodes/octave-mod.el (octave-mark-block): Move out of tokens and + fix open-paren-like token test (bug#12785). + 2012-12-04 Glenn Morris * mail/rmailsum.el (rmail-new-summary): Tweak for diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index ab5a19f8a2..da40cf51be 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -794,11 +794,14 @@ does not end in `...' or `\\' or is inside an open parenthesis list." "Put point at the beginning of this Octave block, mark at the end. The block marked is the one that contains point or follows point." (interactive) + (if (and (looking-at "\\sw\\|\\s_") + (looking-back "\\sw\\|\\s_" (1- (point)))) + (skip-syntax-forward "w_")) (unless (or (looking-at "\\s(") (save-excursion (let* ((token (funcall smie-forward-token-function)) (level (assoc token smie-grammar))) - (and level (null (cadr level)))))) + (and level (not (numberp (cadr level))))))) (backward-up-list 1)) (mark-sexp)) -- 2.20.1