diff options
author | Leo Liu <sdl.web@gmail.com> | 2013-05-29 14:50:48 +0800 |
---|---|---|
committer | Leo Liu <sdl.web@gmail.com> | 2013-05-29 14:50:48 +0800 |
commit | f236dd8432cad5f39088e4b99a44478e21930e4d (patch) | |
tree | 81affd8f4e97a29f76d16dca1b76682b7ec8eca2 /lisp/emacs-lisp | |
parent | bc74a74a5d0efb5d89c06aee1d9135be4f7e73c8 (diff) | |
download | emacs-f236dd8432cad5f39088e4b99a44478e21930e4d.tar.gz emacs-f236dd8432cad5f39088e4b99a44478e21930e4d.tar.bz2 emacs-f236dd8432cad5f39088e4b99a44478e21930e4d.zip |
* lisp/emacs-lisp/smie.el (smie-highlight-matching-block): Always turn
off the highlight first.
* lisp/progmodes/octave.el (octave-indent-comment): Tweak regexps.
(octave-help): Small simplification.
* test/indent/octave.m: Tweak.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/smie.el | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 9e338a0f4be..a88b9d70930 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1060,10 +1060,10 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. beg end (current-buffer)) (overlay-put smie--highlight-matching-block-overlay 'face 'smie-matching-block-highlight)))) - (save-excursion - (condition-case nil - (if (nth 8 (syntax-ppss)) - (overlay-put smie--highlight-matching-block-overlay 'face nil) + (overlay-put smie--highlight-matching-block-overlay 'face nil) + (unless (nth 8 (syntax-ppss)) + (save-excursion + (condition-case nil (let ((token (or (funcall beg-of-tok) (funcall beg-of-tok @@ -1082,11 +1082,8 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. (let ((beg (point)) (opener (funcall smie-forward-token-function))) (when (assoc opener smie-closer-alist) - (funcall highlight beg (point))))) - (t (overlay-put smie--highlight-matching-block-overlay - 'face nil))))) - (scan-error - (overlay-put smie--highlight-matching-block-overlay 'face nil))))))) + (funcall highlight beg (point))))))) + (scan-error))))))) (defvar smie--highlight-matching-block-timer nil) |