summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-04-26 22:33:33 +0000
committerRichard M. Stallman <rms@gnu.org>2002-04-26 22:33:33 +0000
commit501d8923ae2cdec4ef50f050bb66d3715ba2a8f6 (patch)
tree509feb89b97cad2d51f77aceb1c0864095ffb8fc
parentcdd50deacfaa8073807a9b77a1426957d95f4ff7 (diff)
downloademacs-501d8923ae2cdec4ef50f050bb66d3715ba2a8f6.tar.gz
(customize-face-other-window): Make it work similarly.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/cus-edit.el33
2 files changed, 29 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 885c8c92a82..92399745975 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,16 @@
2002-04-26 Richard M. Stallman <rms@gnu.org>
+ * cus-edit.el (customize-face): Use read-face-name
+ and handle multiple faces.
+ (customize-face-other-window): Make it work similarly.
+
+ * faces.el (read-face-name): New defaulting features.
+ New args STRING-DESCRIBING-DEFAULT and MULTIPLE.
+ (list-faces-display): Use the face, not its name string,
+ as arg when running customize-face.
+ Put a `read-face-name' prop on the entire line.
+ (describe-face): Handle multiple faces via read-face-name.
+
* textmodes/tex-mode.el (tex-start-tex): Fix previous change.
2002-04-26 Sam Steingold <sds@gnu.org>
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index bbc3f2b8ad2..ba0758b6781 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1065,22 +1065,25 @@ 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
- (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 ()