diff options
| author | Glenn Morris | 2005-06-22 14:22:02 +0000 |
|---|---|---|
| committer | Glenn Morris | 2005-06-22 14:22:02 +0000 |
| commit | c40f319394304e09801a5d0ab47bcac4dbb1af23 (patch) | |
| tree | 190cf5dee39466db89062757fd3c981ef3fa4f40 | |
| parent | 9a558a07bb44ec16b809c389194a3ff9d8cd96d8 (diff) | |
| download | emacs-c40f319394304e09801a5d0ab47bcac4dbb1af23.tar.gz emacs-c40f319394304e09801a5d0ab47bcac4dbb1af23.zip | |
(customize-face, customize-face-other-window): Handle face aliases.
| -rw-r--r-- | lisp/cus-edit.el | 9 |
1 files changed, 8 insertions, 1 deletions
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." | |||
| 1116 | ;;;###autoload | 1116 | ;;;###autoload |
| 1117 | (defun customize-face (&optional face) | 1117 | (defun customize-face (&optional face) |
| 1118 | "Customize FACE, which should be a face name or nil. | 1118 | "Customize FACE, which should be a face name or nil. |
| 1119 | If FACE is nil, customize all faces. | 1119 | If FACE is nil, customize all faces. If FACE is actually a |
| 1120 | face-alias, customize the face it is aliased to. | ||
| 1120 | 1121 | ||
| 1121 | Interactively, when point is on text which has a face specified, | 1122 | Interactively, when point is on text which has a face specified, |
| 1122 | suggest to customize that face, if it's customizable." | 1123 | suggest to customize that face, if it's customizable." |
| @@ -1133,6 +1134,9 @@ suggest to customize that face, if it's customizable." | |||
| 1133 | face) | 1134 | face) |
| 1134 | t nil) | 1135 | t nil) |
| 1135 | "*Customize Faces*") | 1136 | "*Customize Faces*") |
| 1137 | ;; If FACE is actually an alias, customize the face it is aliased to. | ||
| 1138 | (if (get face 'face-alias) | ||
| 1139 | (setq face (get face 'face-alias))) | ||
| 1136 | (unless (facep face) | 1140 | (unless (facep face) |
| 1137 | (error "Invalid face %S" face)) | 1141 | (error "Invalid face %S" face)) |
| 1138 | (custom-buffer-create (list (list face 'custom-face)) | 1142 | (custom-buffer-create (list (list face 'custom-face)) |
| @@ -1142,6 +1146,7 @@ suggest to customize that face, if it's customizable." | |||
| 1142 | ;;;###autoload | 1146 | ;;;###autoload |
| 1143 | (defun customize-face-other-window (&optional face) | 1147 | (defun customize-face-other-window (&optional face) |
| 1144 | "Show customization buffer for face FACE in other window. | 1148 | "Show customization buffer for face FACE in other window. |
| 1149 | If FACE is actually a face-alias, customize the face it is aliased to. | ||
| 1145 | 1150 | ||
| 1146 | Interactively, when point is on text which has a face specified, | 1151 | Interactively, when point is on text which has a face specified, |
| 1147 | suggest to customize that face, if it's customizable." | 1152 | suggest to customize that face, if it's customizable." |
| @@ -1159,6 +1164,8 @@ suggest to customize that face, if it's customizable." | |||
| 1159 | face) | 1164 | face) |
| 1160 | t nil) | 1165 | t nil) |
| 1161 | "*Customize Faces*") | 1166 | "*Customize Faces*") |
| 1167 | (if (get face 'face-alias) | ||
| 1168 | (setq face (get face 'face-alias))) | ||
| 1162 | (unless (facep face) | 1169 | (unless (facep face) |
| 1163 | (error "Invalid face %S" face)) | 1170 | (error "Invalid face %S" face)) |
| 1164 | (custom-buffer-create-other-window | 1171 | (custom-buffer-create-other-window |