changeset 63661:49d95c194532

(customize-face, customize-face-other-window): Handle face aliases.
author Glenn Morris <rgm@gnu.org>
date Wed, 22 Jun 2005 14:22:02 +0000
parents 47c90f7c23df
children 360c5dd8d233
files lisp/cus-edit.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Wed Jun 22 14:20:18 2005 +0000
+++ b/lisp/cus-edit.el	Wed Jun 22 14:22:02 2005 +0000
@@ -1116,7 +1116,8 @@
 ;;;###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 @@
 				     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 @@
 ;;;###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 @@
 		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