]> git.eshelyaron.com Git - emacs.git/commitdiff
(read-face-name): Don't treat an attribute spec as a list of faces.
authorRichard M. Stallman <rms@gnu.org>
Fri, 31 Dec 2004 15:21:47 +0000 (15:21 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 31 Dec 2004 15:21:47 +0000 (15:21 +0000)
lisp/faces.el

index d2ae90805f2c70680765775efd226b6566f9dda1..86fda8506d49f6188bdf135f7f2580e85c417675 100644 (file)
@@ -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)))