[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114618: * lisp/emacs-lisp/smie.el (smie--matching-b
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] trunk r114618: * lisp/emacs-lisp/smie.el (smie--matching-block-data): Invalidate the |
Date: |
Fri, 11 Oct 2013 00:45:11 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114618
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-10-11 03:45:03 +0300
message:
* lisp/emacs-lisp/smie.el (smie--matching-block-data): Invalidate the
cache also after commands that modify the buffer but don't move
point.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/smie.el smie.el-20100517192034-xap3ihmey43772vj-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-10-10 21:42:38 +0000
+++ b/lisp/ChangeLog 2013-10-11 00:45:03 +0000
@@ -1,3 +1,9 @@
+2013-10-11 Dmitry Gutov <address@hidden>
+
+ * emacs-lisp/smie.el (smie--matching-block-data): Invalidate the
+ cache also after commands that modify the buffer but don't move
+ point.
+
2013-10-10 Stefan Monnier <address@hidden>
* env.el (substitute-env-in-file-name): New function.
=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el 2013-10-07 16:56:51 +0000
+++ b/lisp/emacs-lisp/smie.el 2013-10-11 00:45:03 +0000
@@ -1062,10 +1062,12 @@
(defun smie--matching-block-data (orig &rest args)
"A function suitable for `show-paren-data-function' (which see)."
(if (or (null smie-closer-alist)
- (eq (point) (car smie--matching-block-data-cache)))
+ (equal (cons (point) (buffer-chars-modified-tick))
+ (car smie--matching-block-data-cache)))
(or (cdr smie--matching-block-data-cache)
(apply orig args))
- (setq smie--matching-block-data-cache (list (point)))
+ (setq smie--matching-block-data-cache
+ (list (cons (point) (buffer-chars-modified-tick))))
(unless (nth 8 (syntax-ppss))
(condition-case nil
(let ((here (smie--opener/closer-at-point)))
@@ -1108,7 +1110,7 @@
(nth 1 there) (nth 2 there)
(not (nth 0 there)))))))
(scan-error nil))
- (goto-char (car smie--matching-block-data-cache)))
+ (goto-char (caar smie--matching-block-data-cache)))
(apply #'smie--matching-block-data orig args)))
;;; The indentation engine.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114618: * lisp/emacs-lisp/smie.el (smie--matching-block-data): Invalidate the,
Dmitry Gutov <=