(facemenu-add-new-face): Defend against symbol that isn't a face name.

This commit is contained in:
Richard M. Stallman 2006-10-18 10:51:00 +00:00
parent ec9581d515
commit f3359de125

View file

@ -690,6 +690,9 @@ This is called whenever you create a new face, and at other times."
(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.