mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
* 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
This commit is contained in:
parent
a822acffe2
commit
a175bf337a
4 changed files with 50 additions and 40 deletions
|
|
@ -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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue