summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2002-04-25 15:39:32 +0000
committerMiles Bader <miles@gnu.org>2002-04-25 15:39:32 +0000
commite16a803772f2f31b4dc7736730086c9f596a54e0 (patch)
tree1b2a3840a1ca3146d31d0f0cd1fdff638b5bbb4f /lisp/cus-edit.el
parent4d3eda1c87540f170eb5a6afb1ef03cb972b81af (diff)
downloademacs-e16a803772f2f31b4dc7736730086c9f596a54e0.tar.gz
(customize-face, customize-face-other-window):
Use default instead of initial-input for suggested face.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el26
1 files changed, 16 insertions, 10 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 797d0d5b04c..9fcf1f4ee50 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1040,11 +1040,14 @@ If SYMBOL is nil, customize all faces.
Interactively, when point is on text which has a face specified,
suggest to customized that face, if it's customizable."
(interactive
- (list (completing-read "Customize face (default all): "
- obarray 'custom-facep t
- (let ((face (get-char-property (point) 'face)))
- (when (and face (symbolp face))
- (symbol-name face))))))
+ (list
+ (let ((face (get-char-property (point) 'face)))
+ (if (and face (symbolp face))
+ (completing-read (format "Customize face (default `%s'): "
+ (symbol-name face))
+ obarray 'custom-facep t nil nil (symbol-name face))
+ (completing-read "Customize face (default all): "
+ obarray 'custom-facep t)))))
(if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
(custom-buffer-create (custom-sort-items
(mapcar (lambda (symbol)
@@ -1067,11 +1070,14 @@ suggest to customized that face, if it's customizable."
Interactively, when point is on text which has a face specified,
suggest to customized that face, if it's customizable."
(interactive
- (list (completing-read "Customize face: "
- obarray 'custom-facep t
- (let ((face (get-char-property (point) 'face)))
- (when (and face (symbolp face))
- (symbol-name face))))))
+ (list
+ (let ((face (get-char-property (point) 'face)))
+ (if (and face (symbolp face))
+ (completing-read (format "Customize face (default `%s'): "
+ (symbol-name face))
+ obarray 'custom-facep t nil nil (symbol-name face))
+ (completing-read "Customize face (default all): "
+ obarray 'custom-facep t)))))
(if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
()
(if (stringp symbol)