comparison lisp/paren.el @ 4353:d4e116f25030

(show-paren-command-hook): Specify buffer for move-overay.
author Richard M. Stallman <rms@gnu.org>
date Fri, 30 Jul 1993 07:50:15 +0000
parents a5f0a739d87d
children cb81eadd0df5
comparison
equal deleted inserted replaced
4352:d00889d02f75 4353:d4e116f25030
94 (if (= dir -1) 94 (if (= dir -1)
95 ;; If matching backwards, highlight the closeparen 95 ;; If matching backwards, highlight the closeparen
96 ;; before point as well as its matching open. 96 ;; before point as well as its matching open.
97 (progn 97 (progn
98 (if show-paren-overlay-1 98 (if show-paren-overlay-1
99 (move-overlay show-paren-overlay-1 (+ (point) dir) (point)) 99 (move-overlay show-paren-overlay-1
100 (+ (point) dir) (point)
101 (current-buffer))
100 (setq show-paren-overlay-1 102 (setq show-paren-overlay-1
101 (make-overlay (- pos dir) pos))) 103 (make-overlay (- pos dir) pos)))
102 (overlay-put show-paren-overlay-1 'face face)) 104 (overlay-put show-paren-overlay-1 'face face))
103 ;; Otherwise, turn off any such highlighting. 105 ;; Otherwise, turn off any such highlighting.
104 (and show-paren-overlay-1 106 (and show-paren-overlay-1
105 (overlay-buffer show-paren-overlay-1) 107 (overlay-buffer show-paren-overlay-1)
106 (delete-overlay show-paren-overlay-1))) 108 (delete-overlay show-paren-overlay-1)))
107 ;; Turn on highlighting for the matching paren. 109 ;; Turn on highlighting for the matching paren.
108 (if show-paren-overlay 110 (if show-paren-overlay
109 (move-overlay show-paren-overlay (- pos dir) pos) 111 (move-overlay show-paren-overlay (- pos dir) pos
112 (current-buffer))
110 (setq show-paren-overlay 113 (setq show-paren-overlay
111 (make-overlay (- pos dir) pos))) 114 (make-overlay (- pos dir) pos)))
112 (overlay-put show-paren-overlay 'face face)) 115 (overlay-put show-paren-overlay 'face face))
113 (t 116 (t
114 ;; If not at a paren that has a match, 117 ;; If not at a paren that has a match,