[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b892438 1/2: (blink-matching-open): Restore point b
From: |
Noah Friedman |
Subject: |
[Emacs-diffs] master b892438 1/2: (blink-matching-open): Restore point before calling minibuffer-message. |
Date: |
Mon, 17 Aug 2015 20:01:30 +0000 |
branch: master
commit b892438d7a424e61f174d8b8a57e78077aa96a0c
Author: Noah Friedman <address@hidden>
Commit: Noah Friedman <address@hidden>
(blink-matching-open): Restore point before calling minibuffer-message.
---
lisp/simple.el | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 00c25db..a9ef93e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7005,8 +7005,11 @@ The function should return non-nil if the two tokens do
not match.")
(delete-overlay blink-matching--overlay)))))
(t
(save-excursion
- (goto-char blinkpos)
- (let ((open-paren-line-string
+ (let* ((orig-pos (prog1
+ (point)
+ (goto-char blinkpos)))
+
+ (open-paren-line-string
;; Show what precedes the open in its line, if anything.
(cond
((save-excursion (skip-chars-backward " \t") (not (bolp)))
@@ -7034,6 +7037,9 @@ 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)))))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b892438 1/2: (blink-matching-open): Restore point before calling minibuffer-message.,
Noah Friedman <=