mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-27 10:54:40 +00:00
(show-paren-face): New variable.
(show-paren-command-hook): Use it. Call set-face-background properly.
This commit is contained in:
parent
f5d7a8f2f8
commit
30322a2736
@ -36,12 +36,15 @@
|
||||
|
||||
(defvar show-paren-mismatch-face nil)
|
||||
|
||||
(defvar show-paren-face 'region
|
||||
"*Name of face to use for showing the matching paren.")
|
||||
|
||||
;; Find the place to show, if there is one,
|
||||
;; and show it until input arrives.
|
||||
(defun show-paren-command-hook ()
|
||||
(if window-system
|
||||
(let (pos dir mismatch (oldpos (point))
|
||||
(face 'region))
|
||||
(face show-paren-face))
|
||||
(cond ((eq (char-syntax (following-char)) ?\()
|
||||
(setq dir 1))
|
||||
((eq (char-syntax (preceding-char)) ?\))
|
||||
@ -81,7 +84,8 @@
|
||||
(progn
|
||||
(setq show-paren-mismatch-face
|
||||
(make-face 'paren-mismatch))
|
||||
(set-face-background 'paren-mismatch 'purple))))
|
||||
(set-face-background 'paren-mismatch
|
||||
"purple"))))
|
||||
(if show-paren-mismatch-face
|
||||
(setq face show-paren-mismatch-face)
|
||||
(message "Paren mismatch"))))
|
||||
|
Loading…
Reference in New Issue
Block a user