emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9c1e7d5: Refine the previous change


From: Dmitry Gutov
Subject: [Emacs-diffs] master 9c1e7d5: Refine the previous change
Date: Tue, 18 Aug 2015 16:09:31 +0000

branch: master
commit 9c1e7d5a2666cdf63abcc6623a8489d7bd47fe22
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Refine the previous change
    
    * lisp/simple.el (blink-matching-open): Use minibuffer-message
    outside of save-excursion (bug#21286).
---
 lisp/simple.el |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index afb2d4a..0d691ea 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7004,12 +7004,9 @@ The function should return non-nil if the two tokens do 
not match.")
                      (sit-for blink-matching-delay))
                  (delete-overlay blink-matching--overlay)))))
        (t
-        (save-excursion
-          (let* ((orig-pos (prog1
-                               (point)
-                             (goto-char blinkpos)))
-
-                 (open-paren-line-string
+        (let ((open-paren-line-string
+               (save-excursion
+                 (goto-char blinkpos)
                  ;; Show what precedes the open in its line, if anything.
                  (cond
                   ((save-excursion (skip-chars-backward " \t") (not (bolp)))
@@ -7036,13 +7033,10 @@ The function should return non-nil if the two tokens do 
not match.")
                     "..."
                     (buffer-substring blinkpos (1+ blinkpos))))
                   ;; There is nothing to show except the char itself.
-                  (t (buffer-substring blinkpos (1+ blinkpos))))))
-            ;; Because minibuffer-message causes a full redisplay, go back
-            ;; to the original point before that happens.
-            (goto-char orig-pos)
-            (minibuffer-message
-             "Matches %s"
-             (substring-no-properties open-paren-line-string)))))))))
+                  (t (buffer-substring blinkpos (1+ blinkpos)))))))
+          (minibuffer-message
+           "Matches %s"
+           (substring-no-properties open-paren-line-string))))))))
 
 (defvar blink-paren-function 'blink-matching-open
   "Function called, if non-nil, whenever a close parenthesis is inserted.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]