diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-12-05 00:30:58 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-12-05 00:30:58 -0500 |
commit | ef54d315e8b5472580501b25fc640aba62e98d41 (patch) | |
tree | f430c4380a8b72bc50a0d08ce9bb61211915d765 | |
parent | 82d384f014db7498be0664dfb860234a63742d35 (diff) | |
download | emacs-ef54d315e8b5472580501b25fc640aba62e98d41.tar.gz |
* lisp/progmodes/octave-mod.el (octave-mark-block): Move out of tokens and
fix open-paren-like token test.
Fixes: debbugs:12785
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/progmodes/octave-mod.el | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fc65d2bb3e..5712dd9f8c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-12-05 Stefan Monnier <monnier@iro.umontreal.ca> + + * 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 <rgm@gnu.org> * mail/rmailsum.el (rmail-new-summary): Tweak for diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index ab5a19f8a2f..da40cf51be9 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)) |