From 1bd59f82e73f9c00b3de0420b9b50a0d8f13edd5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 31 Dec 2004 15:21:47 +0000 Subject: [PATCH] (read-face-name): Don't treat an attribute spec as a list of faces. --- lisp/faces.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index d2ae90805f2..86fda8506d4 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -854,12 +854,15 @@ Otherwise, return a single face." (get-char-property (point) 'face))) faces) ;; Make a list of the named faces that the `face' property uses. - (if (listp faceprop) + (if (and (listp faceprop) + ;; Don't treat an attribute spec as a list of faces. + (not (keywordp (car faceprop))) + (not (memq (car faceprop) '(foreground-color background-color)))) (dolist (f faceprop) (if (symbolp f) (push f faces))) (if (symbolp faceprop) - (setq faces (list faceprop)))) + (push faceprop faces))) ;; If there are none, try to get a face name from the buffer. (if (and (null faces) (memq (intern-soft (thing-at-point 'symbol)) (face-list))) -- 2.39.5