(show-paren-command-hook): Don't alter paren-mismatch face
authorRichard M. Stallman <rms@gnu.org>
Tue, 10 Jan 1995 17:44:28 +0000 (17:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 10 Jan 1995 17:44:28 +0000 (17:44 +0000)
if make-face gives it some contents.

lisp/paren.el

index eb10891..0a151d1 100644 (file)
                    (progn
                      (and (null show-paren-mismatch-face)
                           (x-display-color-p)
-                          (or (internal-find-face 'paren-mismatch)
-                              (progn
-                                (make-face 'paren-mismatch)
-                                (set-face-background 'paren-mismatch
-                                                     "purple")
-                                (set-face-foreground 'paren-mismatch
-                                                     "white")))
-                          (setq show-paren-mismatch-face 'paren-mismatch))
+                          (progn
+                            (make-face 'paren-mismatch)
+                            (or (face-nontrivial-p 'paren-mismatch t)
+                                (progn
+                                  (set-face-background 'paren-mismatch
+                                                       "purple")
+                                  (set-face-foreground 'paren-mismatch
+                                                       "white")))
+                            (setq show-paren-mismatch-face 'paren-mismatch)))
                      (if show-paren-mismatch-face
                          (setq face show-paren-mismatch-face)
                        (message "Paren mismatch"))))