diff options
| author | Gerd Moellmann | 2002-04-25 14:21:47 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2002-04-25 14:21:47 +0000 |
| commit | d29a536ab9e253f4b02282ac7356422bc6201ac0 (patch) | |
| tree | 62005119bfbc52dcc54a76a0f9d52fba076cffc8 | |
| parent | 6f4426332dab4a0bd2c587d4877db45817062b9f (diff) | |
| download | emacs-d29a536ab9e253f4b02282ac7356422bc6201ac0.tar.gz emacs-d29a536ab9e253f4b02282ac7356422bc6201ac0.zip | |
(customize-face-other-window, customize-face):
Interactively, when point is on text with a face, suggest to
customize that face.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 26 |
2 files changed, 26 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8deeadac3ae..348ae701550 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2002-04-25 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * cus-edit.el (customize-face-other-window, customize-face): | ||
| 4 | Interactively, when point is on text with a face, suggest to | ||
| 5 | customize that face. | ||
| 6 | |||
| 1 | 2002-04-24 Colin Walters <walters@verbum.org> | 7 | 2002-04-24 Colin Walters <walters@verbum.org> |
| 2 | 8 | ||
| 3 | * replace.el (occur-accumulate-lines): Add optional argument | 9 | * replace.el (occur-accumulate-lines): Add optional argument |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index c1b69d5f006..797d0d5b04c 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1035,9 +1035,16 @@ Show the buffer in another window, but don't select it." | |||
| 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) |
| @@ -1055,9 +1062,16 @@ If SYMBOL is nil, customize all faces." | |||
| 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) |