]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/faces.el (face-name): Return input arg `face' as is
authorJuri Linkov <juri@jurta.org>
Tue, 8 Jul 2014 09:03:23 +0000 (12:03 +0300)
committerJuri Linkov <juri@jurta.org>
Tue, 8 Jul 2014 09:03:23 +0000 (12:03 +0300)
when it's not a symbol.
(x-resolve-font-name): Don't check if the face is a symbol.

Fixes: debbugs:17956
lisp/ChangeLog
lisp/faces.el

index 4803ca0f1e1daf8670f2ac4f317cdd84aeaf6943..d346ac65def71fc24428adc7a87363c34d685824 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7caba9a96c2740f8ce3a491704edab088d461ce2..d0e768c834ec771c7c60ad13204741f0a0974ae8 100644 (file)
@@ -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