diff options
| author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-11-15 18:42:20 +0000 |
|---|---|---|
| committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-11-15 18:43:28 +0000 |
| commit | 4f19767dfa527955b94c9133e8ce03cf1c766750 (patch) | |
| tree | df8992897099b41e98845d549466ca0cdf445753 /lisp/faces.el | |
| parent | 8121757b3ae6cbb7a7bac12b11ac32f243657aee (diff) | |
| download | emacs-4f19767dfa527955b94c9133e8ce03cf1c766750.tar.gz | |
* lisp/faces.el (faces--attribute-at-point): Fix an issue
Previous code would signal an error when the face at point was
a manually built list of attributes such as '(:foregroud "white").
* test/automated/faces-tests.el (faces--test-color-at-point): Add a test
Diffstat (limited to 'lisp/faces.el')
| -rw-r--r-- | lisp/faces.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index f96df057cbd..d612461239e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1971,7 +1971,11 @@ unnamed faces (e.g, `foreground-color')." (get-char-property (point) 'font-lock-face)) (get-char-property (point) 'face))) (found nil)) - (dolist (face (if (listp faces) faces (list faces))) + ;; The attribute might be a face, a list of faces, or a list of + ;; attributes that make a face. Normalize it to a list of faces. + (dolist (face (if (and (listp faces) (facep (car faces))) + faces + (list faces))) (cond (found) ((and face (symbolp face)) (let ((value (face-attribute-specified-or |
