From: Juanma Barranquero Date: Tue, 5 Jun 2007 10:13:03 +0000 (+0000) Subject: (face-id): If the argument is a face alias, return the ID of the target face. X-Git-Tag: emacs-pretest-23.0.90~12492 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2d5aa4656a43a2e2f28f4d53b53e07258dccf66;p=emacs.git (face-id): If the argument is a face alias, return the ID of the target face. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3b4b72e31cc..d3ae809deda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-06-05 Juanma Barranquero + + * faces.el (face-id): If the argument is a face alias, + return the ID of the target face. + 2007-06-05 Michael Albinus * net/socks.el (top): Remove unnecessary copyright line. diff --git a/lisp/faces.el b/lisp/faces.el index a8c92ab9a75..048dae039ad 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -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.