Mercurial > emacs
comparison lisp/paren.el @ 30787:efa4d1ed3f1b
(show-paren-priority): New user option.
(show-paren-function): Set overlay priorities to
show-paren-priority.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 14 Aug 2000 19:46:18 +0000 |
parents | bb0def506686 |
children | 236a7f6d898d |
comparison
equal
deleted
inserted
replaced
30786:550344dcef43 | 30787:efa4d1ed3f1b |
---|---|
67 (if (featurep 'lisp-float-type) (/ (float 1) (float 8)) 1) | 67 (if (featurep 'lisp-float-type) (/ (float 1) (float 8)) 1) |
68 "*Time in seconds to delay before showing a matching paren." | 68 "*Time in seconds to delay before showing a matching paren." |
69 :type '(number :tag "seconds") | 69 :type '(number :tag "seconds") |
70 :group 'paren-showing) | 70 :group 'paren-showing) |
71 | 71 |
72 (defcustom show-paren-priority 1000 | |
73 "*Priority of paren highlighting overlays." | |
74 :type 'integer | |
75 :group 'paren-showing | |
76 :version "21.1") | |
77 | |
72 (defcustom show-paren-ring-bell-on-mismatch nil | 78 (defcustom show-paren-ring-bell-on-mismatch nil |
73 "*If non-nil, beep if mismatched paren is detected." | 79 "*If non-nil, beep if mismatched paren is detected." |
74 :type 'boolean | 80 :type 'boolean |
75 :group 'paren-showing | 81 :group 'paren-showing |
76 :version "20.3") | 82 :version "20.3") |
202 (point)))) | 208 (point)))) |
203 (if show-paren-overlay-1 | 209 (if show-paren-overlay-1 |
204 (move-overlay show-paren-overlay-1 from to (current-buffer)) | 210 (move-overlay show-paren-overlay-1 from to (current-buffer)) |
205 (setq show-paren-overlay-1 (make-overlay from to))) | 211 (setq show-paren-overlay-1 (make-overlay from to))) |
206 ;; Always set the overlay face, since it varies. | 212 ;; Always set the overlay face, since it varies. |
213 (overlay-put show-paren-overlay-1 'priority show-paren-priority) | |
207 (overlay-put show-paren-overlay-1 'face face))) | 214 (overlay-put show-paren-overlay-1 'face face))) |
208 ;; | 215 ;; |
209 ;; Turn on highlighting for the matching paren, if found. | 216 ;; Turn on highlighting for the matching paren, if found. |
210 ;; If it's an unmatched paren, turn off any such highlighting. | 217 ;; If it's an unmatched paren, turn off any such highlighting. |
211 (unless (integerp pos) | 218 (unless (integerp pos) |
225 (if show-paren-overlay | 232 (if show-paren-overlay |
226 (move-overlay show-paren-overlay from to (current-buffer)) | 233 (move-overlay show-paren-overlay from to (current-buffer)) |
227 (setq show-paren-overlay (make-overlay from to)))) | 234 (setq show-paren-overlay (make-overlay from to)))) |
228 ;; | 235 ;; |
229 ;; Always set the overlay face, since it varies. | 236 ;; Always set the overlay face, since it varies. |
237 (overlay-put show-paren-overlay 'priority show-paren-priority) | |
230 (overlay-put show-paren-overlay 'face face))) | 238 (overlay-put show-paren-overlay 'face face))) |
231 ;; show-paren-mode is nil in this buffer. | 239 ;; show-paren-mode is nil in this buffer. |
232 (and show-paren-overlay | 240 (and show-paren-overlay |
233 (delete-overlay show-paren-overlay)) | 241 (delete-overlay show-paren-overlay)) |
234 (and show-paren-overlay-1 | 242 (and show-paren-overlay-1 |