Commit 1bd59f82 authored by Richard M. Stallman's avatar Richard M. Stallman

(read-face-name): Don't treat an attribute spec as a list of faces.

parent d020fce0
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment