summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/smie.el
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2013-06-07 19:48:28 +0800
committerLeo Liu <sdl.web@gmail.com>2013-06-07 19:48:28 +0800
commita175bf337ae1cb146bf01f69648cd5cbe35d4384 (patch)
treebbde4dca7baf42da9b709051f22726011fb1d41a /lisp/emacs-lisp/smie.el
parenta822acffe2a370ed1726db92aad64b5287582a73 (diff)
downloademacs-a175bf337ae1cb146bf01f69648cd5cbe35d4384.tar.gz
* newcomment.el (comment-search-backward): Revert last change.
* emacs-lisp/smie.el (smie--matching-block-data): Minor simplification. * progmodes/octave.el (octave-mode): Set comment-use-global-state to t. (Bug#14303) Fixes: debbugs:14434 debbugs:14303
Diffstat (limited to 'lisp/emacs-lisp/smie.el')
-rw-r--r--lisp/emacs-lisp/smie.el34
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index f4eda606ad6..e97e9d066fd 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1057,24 +1057,24 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'.
(funcall smie-forward-token-function)))))))
(unless (nth 8 (syntax-ppss))
(condition-case nil
- (let ((here (funcall tok-at-pt)))
+ (let ((here (funcall tok-at-pt))
+ there pair)
(when here
- (let (pair there)
- (cond
- ((assoc (car here) smie-closer-alist) ; opener
- (forward-sexp 1)
- (setq there (funcall tok-at-pt))
- (setq pair (cons (car here) (car there))))
- ((rassoc (car here) smie-closer-alist) ; closer
- (funcall smie-forward-token-function)
- (forward-sexp -1)
- (setq there (funcall tok-at-pt))
- (setq pair (cons (car there) (car here)))))
- ;; Update the cache
- (setcdr smie--matching-block-data-cache
- (list (nth 1 here) (nth 2 here)
- (nth 1 there) (nth 2 there)
- (not (member pair smie-closer-alist)))))))
+ (cond
+ ((assoc (car here) smie-closer-alist) ; opener
+ (forward-sexp 1)
+ (setq there (funcall tok-at-pt))
+ (setq pair (cons (car here) (car there))))
+ ((rassoc (car here) smie-closer-alist) ; closer
+ (funcall smie-forward-token-function)
+ (forward-sexp -1)
+ (setq there (funcall tok-at-pt))
+ (setq pair (cons (car there) (car here)))))
+ ;; Update the cache
+ (setcdr smie--matching-block-data-cache
+ (list (nth 1 here) (nth 2 here)
+ (nth 1 there) (nth 2 there)
+ (not (member pair smie-closer-alist))))))
(scan-error))
(goto-char (car smie--matching-block-data-cache))))
(apply #'smie--matching-block-data orig args))))