* lisp/progmodes/octave-mod.el (octave-mark-block): Move out of tokens and

fix open-paren-like token test.

Fixes: debbugs:12785
This commit is contained in:
Stefan Monnier 2012-12-05 00:30:58 -05:00
parent 82d384f014
commit ef54d315e8
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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))