changeset 44844:324d8fdc4c6f

(customize-face, customize-face-other-window): Use default instead of initial-input for suggested face.
author Miles Bader <miles@gnu.org>
date Thu, 25 Apr 2002 15:38:32 +0000
parents 4872781b98d4
children 173cb940d81c
files lisp/cus-edit.el
diffstat 1 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Thu Apr 25 14:23:22 2002 +0000
+++ b/lisp/cus-edit.el	Thu Apr 25 15:38:32 2002 +0000
@@ -1040,11 +1040,14 @@
 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 @@
 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)