From a175bf337ae1cb146bf01f69648cd5cbe35d4384 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 7 Jun 2013 19:48:28 +0800 Subject: * 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 --- lisp/emacs-lisp/smie.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lisp/emacs-lisp') 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)))) -- cgit v1.2.3