comparison lisp/paren.el @ 63202:d307630996bc

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373 Remove "-face" suffix from show-paren faces 2005-06-10 Miles Bader <miles@gnu.org> * lisp/paren.el (show-paren-match, show-paren-mismatch): Remove "-face" suffix from face names. (show-paren-match-face, show-paren-mismatch-face): New backward-compatibility aliases for renamed faces. (show-paren-function): Use renamed show-paren faces.
author Miles Bader <miles@gnu.org>
date Fri, 10 Jun 2005 08:25:35 +0000
parents d7252d4ac684
children 6fb026ad601f a1b34dec1104
comparison
equal deleted inserted replaced
63201:c1af317747bc 63202:d307630996bc
69 "*If non-nil, beep if mismatched paren is detected." 69 "*If non-nil, beep if mismatched paren is detected."
70 :type 'boolean 70 :type 'boolean
71 :group 'paren-showing 71 :group 'paren-showing
72 :version "20.3") 72 :version "20.3")
73 73
74 (defface show-paren-match-face 74 (defface show-paren-match
75 '((((class color) (background light)) 75 '((((class color) (background light))
76 :background "turquoise") ; looks OK on tty (becomes cyan) 76 :background "turquoise") ; looks OK on tty (becomes cyan)
77 (((class color) (background dark)) 77 (((class color) (background dark))
78 :background "steelblue3") ; looks OK on tty (becomes blue) 78 :background "steelblue3") ; looks OK on tty (becomes blue)
79 (((background dark)) 79 (((background dark))
81 (t 81 (t
82 :background "gray")) 82 :background "gray"))
83 "Show Paren mode face used for a matching paren." 83 "Show Paren mode face used for a matching paren."
84 :group 'faces 84 :group 'faces
85 :group 'paren-showing) 85 :group 'paren-showing)
86 86 ;; backward-compatibility alias
87 (defface show-paren-mismatch-face 87 (put 'show-paren-match-face 'face-alias 'show-paren-match)
88
89 (defface show-paren-mismatch
88 '((((class color)) (:foreground "white" :background "purple")) 90 '((((class color)) (:foreground "white" :background "purple"))
89 (t (:inverse-video t))) 91 (t (:inverse-video t)))
90 "Show Paren mode face used for a mismatching paren." 92 "Show Paren mode face used for a mismatching paren."
91 :group 'faces 93 :group 'faces
92 :group 'paren-showing) 94 :group 'paren-showing)
95 ;; backward-compatibility alias
96 (put 'show-paren-mismatch-face 'face-alias 'show-paren-mismatch)
93 97
94 (defvar show-paren-highlight-openparen t 98 (defvar show-paren-highlight-openparen t
95 "*Non-nil turns on openparen highlighting when matching forward.") 99 "*Non-nil turns on openparen highlighting when matching forward.")
96 100
97 (defvar show-paren-idle-timer nil) 101 (defvar show-paren-idle-timer nil)
191 ;; Use the correct face. 195 ;; Use the correct face.
192 (if mismatch 196 (if mismatch
193 (progn 197 (progn
194 (if show-paren-ring-bell-on-mismatch 198 (if show-paren-ring-bell-on-mismatch
195 (beep)) 199 (beep))
196 (setq face 'show-paren-mismatch-face)) 200 (setq face 'show-paren-mismatch))
197 (setq face 'show-paren-match-face)) 201 (setq face 'show-paren-match))
198 ;; 202 ;;
199 ;; If matching backwards, highlight the closeparen 203 ;; If matching backwards, highlight the closeparen
200 ;; before point as well as its matching open. 204 ;; before point as well as its matching open.
201 ;; If matching forward, and the openparen is unbalanced, 205 ;; If matching forward, and the openparen is unbalanced,
202 ;; highlight the paren at point to indicate misbalance. 206 ;; highlight the paren at point to indicate misbalance.