Mercurial > emacs
comparison lisp/cus-edit.el @ 44841:ca88dc883a8d
(customize-face-other-window, customize-face):
Interactively, when point is on text with a face, suggest to
customize that face.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 25 Apr 2002 14:20:46 +0000 |
parents | 3e650ff5c22e |
children | 324d8fdc4c6f |
comparison
equal
deleted
inserted
replaced
44840:f0fef1c2081f | 44841:ca88dc883a8d |
---|---|
1033 (format "*Customize Option: %s*" (custom-unlispify-tag-name symbol)))) | 1033 (format "*Customize Option: %s*" (custom-unlispify-tag-name symbol)))) |
1034 | 1034 |
1035 ;;;###autoload | 1035 ;;;###autoload |
1036 (defun customize-face (&optional symbol) | 1036 (defun customize-face (&optional symbol) |
1037 "Customize SYMBOL, which should be a face name or nil. | 1037 "Customize SYMBOL, which should be a face name or nil. |
1038 If SYMBOL is nil, customize all faces." | 1038 If SYMBOL is nil, customize all faces. |
1039 (interactive (list (completing-read "Customize face: (default all) " | 1039 |
1040 obarray 'custom-facep t))) | 1040 Interactively, when point is on text which has a face specified, |
1041 suggest to customized that face, if it's customizable." | |
1042 (interactive | |
1043 (list (completing-read "Customize face (default all): " | |
1044 obarray 'custom-facep t | |
1045 (let ((face (get-char-property (point) 'face))) | |
1046 (when (and face (symbolp face)) | |
1047 (symbol-name face)))))) | |
1041 (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) | 1048 (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) |
1042 (custom-buffer-create (custom-sort-items | 1049 (custom-buffer-create (custom-sort-items |
1043 (mapcar (lambda (symbol) | 1050 (mapcar (lambda (symbol) |
1044 (list symbol 'custom-face)) | 1051 (list symbol 'custom-face)) |
1045 (face-list)) | 1052 (face-list)) |
1053 (format "*Customize Face: %s*" | 1060 (format "*Customize Face: %s*" |
1054 (custom-unlispify-tag-name symbol))))) | 1061 (custom-unlispify-tag-name symbol))))) |
1055 | 1062 |
1056 ;;;###autoload | 1063 ;;;###autoload |
1057 (defun customize-face-other-window (&optional symbol) | 1064 (defun customize-face-other-window (&optional symbol) |
1058 "Show customization buffer for face SYMBOL in other window." | 1065 "Show customization buffer for face SYMBOL in other window. |
1059 (interactive (list (completing-read "Customize face: " | 1066 |
1060 obarray 'custom-facep t))) | 1067 Interactively, when point is on text which has a face specified, |
1068 suggest to customized that face, if it's customizable." | |
1069 (interactive | |
1070 (list (completing-read "Customize face: " | |
1071 obarray 'custom-facep t | |
1072 (let ((face (get-char-property (point) 'face))) | |
1073 (when (and face (symbolp face)) | |
1074 (symbol-name face)))))) | |
1061 (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) | 1075 (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) |
1062 () | 1076 () |
1063 (if (stringp symbol) | 1077 (if (stringp symbol) |
1064 (setq symbol (intern symbol))) | 1078 (setq symbol (intern symbol))) |
1065 (unless (symbolp symbol) | 1079 (unless (symbolp symbol) |