aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-04-19 17:21:37 +0000
committerChong Yidong2007-04-19 17:21:37 +0000
commitbbcda6be9a90b901ec188bf4227f4f09e64498e6 (patch)
tree446c03b150bdc4ff24f6bac9a7cc4e25cb91cd63
parentbae6731f9ca7cd09bee6517272422cded5dcb4e8 (diff)
downloademacs-bbcda6be9a90b901ec188bf4227f4f09e64498e6.tar.gz
emacs-bbcda6be9a90b901ec188bf4227f4f09e64498e6.zip
(show-paren-function): Reset window-start to avoid recentering.
-rw-r--r--lisp/paren.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/paren.el b/lisp/paren.el
index 95f718d5683..17f0c401901 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -143,6 +143,7 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
143 (let ((oldpos (point)) 143 (let ((oldpos (point))
144 (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) 144 (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
145 ((eq (syntax-class (syntax-after (point))) 4) 1))) 145 ((eq (syntax-class (syntax-after (point))) 4) 1)))
146 (window-start (window-start))
146 pos mismatch face) 147 pos mismatch face)
147 ;; 148 ;;
148 ;; Find the other end of the sexp. 149 ;; Find the other end of the sexp.
@@ -247,7 +248,12 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
247 ;; 248 ;;
248 ;; Always set the overlay face, since it varies. 249 ;; Always set the overlay face, since it varies.
249 (overlay-put show-paren-overlay 'priority show-paren-priority) 250 (overlay-put show-paren-overlay 'priority show-paren-priority)
250 (overlay-put show-paren-overlay 'face face))) 251 (overlay-put show-paren-overlay 'face face))
252 ;; If there are continued lines, the above operations can
253 ;; force redisplay to recenter the window (since there is no
254 ;; way for it to know that the overlay changes to the buffer
255 ;; are harmless). So reset the window-start.
256 (set-window-start (selected-window) window-start))
251 ;; show-paren-mode is nil in this buffer. 257 ;; show-paren-mode is nil in this buffer.
252 (and show-paren-overlay 258 (and show-paren-overlay
253 (delete-overlay show-paren-overlay)) 259 (delete-overlay show-paren-overlay))