]> git.eshelyaron.com Git - emacs.git/commitdiff
(face-id): If the argument is a face alias, return the ID of the target face.
authorJuanma Barranquero <lekktu@gmail.com>
Tue, 5 Jun 2007 10:13:03 +0000 (10:13 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Tue, 5 Jun 2007 10:13:03 +0000 (10:13 +0000)
lisp/ChangeLog
lisp/faces.el

index 3b4b72e31ccb59c70434cf342b02462bc4543e5b..d3ae809dedafed13aedfe6e521b6fa3e47da4812 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-05  Juanma Barranquero  <lekktu@gmail.com>
+
+       * faces.el (face-id): If the argument is a face alias,
+       return the ID of the target face.
+
 2007-06-05  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/socks.el (top): Remove unnecessary copyright line.
index a8c92ab9a75bda8eed9e8555ca53f4746f9efe25..048dae039adc894975f01a249005a27e8d5a5059 100644 (file)
@@ -222,11 +222,12 @@ Value is FACE."
 
 (defun face-id (face &optional frame)
   "Return the internal ID of face with name FACE.
+If FACE is a face-alias, return the ID of the target face.
 The optional argument FRAME is ignored, since the internal face ID
 of a face name is the same for all frames."
   (check-face face)
-  (get face 'face))
-
+  (or (get face 'face)
+      (face-id (get face 'face-alias))))
 
 (defun face-equal (face1 face2 &optional frame)
   "Non-nil if faces FACE1 and FACE2 are equal.