changeset 59262:c9bf2e1b7e1a

(read-face-name): Don't treat an attribute spec as a list of faces.
author Richard M. Stallman <rms@gnu.org>
date Fri, 31 Dec 2004 15:21:47 +0000
parents 73f5be00ba89
children dba05e4999d2
files lisp/faces.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Fri Dec 31 15:13:00 2004 +0000
+++ b/lisp/faces.el	Fri Dec 31 15:21:47 2004 +0000
@@ -854,12 +854,15 @@
 		      (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)))