aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorJuanma Barranquero2007-06-05 10:13:03 +0000
committerJuanma Barranquero2007-06-05 10:13:03 +0000
commitb2d5aa4656a43a2e2f28f4d53b53e07258dccf66 (patch)
treea45867e893e45933e66a2f6331a7943cab19c6ee /lisp/faces.el
parent65fddb7472842a1de3be0e8b0fdba849b6555bcc (diff)
downloademacs-b2d5aa4656a43a2e2f28f4d53b53e07258dccf66.tar.gz
emacs-b2d5aa4656a43a2e2f28f4d53b53e07258dccf66.zip
(face-id): If the argument is a face alias, return the ID of the target face.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el5
1 files changed, 3 insertions, 2 deletions
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."
222 222
223(defun face-id (face &optional frame) 223(defun face-id (face &optional frame)
224 "Return the internal ID of face with name FACE. 224 "Return the internal ID of face with name FACE.
225If FACE is a face-alias, return the ID of the target face.
225The optional argument FRAME is ignored, since the internal face ID 226The optional argument FRAME is ignored, since the internal face ID
226of a face name is the same for all frames." 227of a face name is the same for all frames."
227 (check-face face) 228 (check-face face)
228 (get face 'face)) 229 (or (get face 'face)
229 230 (face-id (get face 'face-alias))))
230 231
231(defun face-equal (face1 face2 &optional frame) 232(defun face-equal (face1 face2 &optional frame)
232 "Non-nil if faces FACE1 and FACE2 are equal. 233 "Non-nil if faces FACE1 and FACE2 are equal.