From c40f319394304e09801a5d0ab47bcac4dbb1af23 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 22 Jun 2005 14:22:02 +0000 Subject: [PATCH] (customize-face, customize-face-other-window): Handle face aliases. --- lisp/cus-edit.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d2f89efb7f5..4889ec6d62d 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1116,7 +1116,8 @@ version." ;;;###autoload (defun customize-face (&optional face) "Customize FACE, which should be a face name or nil. -If FACE is nil, customize all faces. +If FACE is nil, customize all faces. If FACE is actually a +face-alias, customize the face it is aliased to. Interactively, when point is on text which has a face specified, suggest to customize that face, if it's customizable." @@ -1133,6 +1134,9 @@ suggest to customize that face, if it's customizable." face) t nil) "*Customize Faces*") + ;; If FACE is actually an alias, customize the face it is aliased to. + (if (get face 'face-alias) + (setq face (get face 'face-alias))) (unless (facep face) (error "Invalid face %S" face)) (custom-buffer-create (list (list face 'custom-face)) @@ -1142,6 +1146,7 @@ suggest to customize that face, if it's customizable." ;;;###autoload (defun customize-face-other-window (&optional face) "Show customization buffer for face FACE in other window. +If FACE is actually a face-alias, customize the face it is aliased to. Interactively, when point is on text which has a face specified, suggest to customize that face, if it's customizable." @@ -1159,6 +1164,8 @@ suggest to customize that face, if it's customizable." face) t nil) "*Customize Faces*") + (if (get face 'face-alias) + (setq face (get face 'face-alias))) (unless (facep face) (error "Invalid face %S" face)) (custom-buffer-create-other-window -- 2.39.2