changeset 73412:fb5c7e2b2689

(facemenu-add-new-face): Defend against symbol that isn't a face name.
author Richard M. Stallman <rms@gnu.org>
date Wed, 18 Oct 2006 10:51:00 +0000
parents 450378d39536
children d14b0d59315b
files lisp/facemenu.el
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/facemenu.el	Wed Oct 18 10:50:28 2006 +0000
+++ b/lisp/facemenu.el	Wed Oct 18 10:51:00 2006 +0000
@@ -690,6 +690,9 @@
     (cond ((facemenu-iterate ; check if equivalent face is already in the menu
 	    (lambda (m) (and (listp m)
 			     (symbolp (car m))
+			     ;; Avoid error in face-equal
+			     ;; when a non-face is erroneously present.
+			     (facep (car m))
 			     (face-equal (car m) symbol)))
 	    (cdr (symbol-function menu))))
 	  ;; Faces with a keyboard equivalent.  These go at the front.