changeset 4183:a5f0a739d87d

(show-paren-face): New variable. (show-paren-command-hook): Use it. Call set-face-background properly.
author Richard M. Stallman <rms@gnu.org>
date Tue, 20 Jul 1993 05:59:51 +0000
parents b85c00ac4ae3
children 4a40e0433bf9
files lisp/paren.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/paren.el	Tue Jul 20 05:55:31 1993 +0000
+++ b/lisp/paren.el	Tue Jul 20 05:59:51 1993 +0000
@@ -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"))))