aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoah Friedman2015-08-17 12:59:12 -0700
committerNoah Friedman2015-08-17 12:59:12 -0700
commitb892438d7a424e61f174d8b8a57e78077aa96a0c (patch)
tree0dd16b5869513916e29549e2d4aa3541929b6345
parentb629566ac35576e6247cdc043cb8013fd2b8ae50 (diff)
downloademacs-b892438d7a424e61f174d8b8a57e78077aa96a0c.tar.gz
emacs-b892438d7a424e61f174d8b8a57e78077aa96a0c.zip
(blink-matching-open): Restore point before calling minibuffer-message.
-rw-r--r--lisp/simple.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 00c25db07d7..a9ef93e191c 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.")
7005 (delete-overlay blink-matching--overlay))))) 7005 (delete-overlay blink-matching--overlay)))))
7006 (t 7006 (t
7007 (save-excursion 7007 (save-excursion
7008 (goto-char blinkpos) 7008 (let* ((orig-pos (prog1
7009 (let ((open-paren-line-string 7009 (point)
7010 (goto-char blinkpos)))
7011
7012 (open-paren-line-string
7010 ;; Show what precedes the open in its line, if anything. 7013 ;; Show what precedes the open in its line, if anything.
7011 (cond 7014 (cond
7012 ((save-excursion (skip-chars-backward " \t") (not (bolp))) 7015 ((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.")
7034 (buffer-substring blinkpos (1+ blinkpos)))) 7037 (buffer-substring blinkpos (1+ blinkpos))))
7035 ;; There is nothing to show except the char itself. 7038 ;; There is nothing to show except the char itself.
7036 (t (buffer-substring blinkpos (1+ blinkpos)))))) 7039 (t (buffer-substring blinkpos (1+ blinkpos))))))
7040 ;; Because minibuffer-message causes a full redisplay, go back
7041 ;; to the original point before that happens.
7042 (goto-char orig-pos)
7037 (minibuffer-message 7043 (minibuffer-message
7038 "Matches %s" 7044 "Matches %s"
7039 (substring-no-properties open-paren-line-string))))))))) 7045 (substring-no-properties open-paren-line-string)))))))))