changeset 44888:b74399186334

(customize-face-other-window): Make it work similarly.
author Richard M. Stallman <rms@gnu.org>
date Fri, 26 Apr 2002 22:33:23 +0000
parents 01a5b217fd7f
children e3b9f45140a5
files lisp/cus-edit.el
diffstat 1 files changed, 18 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Fri Apr 26 22:31:57 2002 +0000
+++ b/lisp/cus-edit.el	Fri Apr 26 22:33:23 2002 +0000
@@ -1065,22 +1065,25 @@
 Interactively, when point is on text which has a face specified,
 suggest to customized that face, if it's customizable."
   (interactive
-   (list
-    (let ((face (get-char-property (point) 'face)))
-      (if (and face (symbolp face))
-	  (completing-read (format "Customize face (default `%s'): " 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)
-	(setq symbol (intern symbol)))
-    (unless (symbolp symbol)
-      (error "Should be a symbol %S" symbol))
+   (list (read-face-name "Customize face" "all faces" t)))
+  (if (member face '(nil ""))
+      (setq face (face-list)))
+  (if (and (listp face) (null (cdr face)))
+      (setq face (car face)))
+  (if (listp face)
+      (custom-buffer-create-other-window
+       (custom-sort-items
+	(mapcar (lambda (s)
+		  (list s 'custom-face))
+		face)
+	t nil)
+       "*Customize Faces*")
+    (unless (facep face)
+      (error "Invalid face %S"))
     (custom-buffer-create-other-window
-     (list (list symbol 'custom-face))
-     (format "*Customize Face: %s*" (custom-unlispify-tag-name symbol)))))
+     (list (list face 'custom-face))
+     (format "*Customize Face: %s*"
+	     (custom-unlispify-tag-name face)))))
 
 ;;;###autoload
 (defun customize-customized ()