diff options
| author | Juri Linkov <juri@jurta.org> | 2014-07-08 12:03:23 +0300 |
|---|---|---|
| committer | Juri Linkov <juri@jurta.org> | 2014-07-08 12:03:23 +0300 |
| commit | 6dc311adc3908257011bd9d21426a5d4d92616eb (patch) | |
| tree | 880e14ce7b3a991ef4754ed13d81baba6dd1b798 /lisp | |
| parent | b08e34f03ac827e43310fe8aaa0c25bc7f12a034 (diff) | |
| download | emacs-6dc311adc3908257011bd9d21426a5d4d92616eb.tar.gz | |
* lisp/faces.el (face-name): Return input arg `face' as is
when it's not a symbol.
(x-resolve-font-name): Don't check if the face is a symbol.
Fixes: debbugs:17956
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/faces.el | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4803ca0f1e1..d346ac65def 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2014-07-08 Juri Linkov <juri@jurta.org> + * faces.el (face-name): Return input arg `face' as is + when it's not a symbol. + (x-resolve-font-name): Don't check if the face is a symbol. + (Bug#17956) + +2014-07-08 Juri Linkov <juri@jurta.org> + * facemenu.el (list-colors-print): In help-echo format use %.2f instead of %d because now HSV values are floating-point components between 0.0 and 1.0. diff --git a/lisp/faces.el b/lisp/faces.el index 7caba9a96c2..d0e768c834e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -359,7 +359,10 @@ If `inhibit-x-resources' is non-nil, this function does nothing." (defun face-name (face) "Return the name of face FACE." - (symbol-name (check-face face))) + (check-face face) + (if (symbolp face) + (symbol-name face) + face)) (defun face-all-attributes (face &optional frame) @@ -2731,8 +2734,8 @@ If PATTERN is nil, return the name of the frame's base font, which never contains wildcards. Given optional arguments FACE and FRAME, return a font which is also the same size as FACE on FRAME, or fail." - (or (symbolp face) - (setq face (face-name face))) + (when face + (setq face (face-name face))) (and (eq frame t) (setq frame nil)) (if pattern |
