# HG changeset patch # User Gerd Moellmann # Date 1019744446 0 # Node ID ca88dc883a8d8c5bcefd626f7d59e296be6b591e # Parent f0fef1c2081f181642425db49c0e4e310e97cf43 (customize-face-other-window, customize-face): Interactively, when point is on text with a face, suggest to customize that face. diff -r f0fef1c2081f -r ca88dc883a8d lisp/cus-edit.el --- a/lisp/cus-edit.el Thu Apr 25 12:15:14 2002 +0000 +++ b/lisp/cus-edit.el Thu Apr 25 14:20:46 2002 +0000 @@ -1035,9 +1035,16 @@ ;;;###autoload (defun customize-face (&optional symbol) "Customize SYMBOL, which should be a face name or nil. -If SYMBOL is nil, customize all faces." - (interactive (list (completing-read "Customize face: (default all) " - obarray 'custom-facep t))) +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)))))) (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) (custom-buffer-create (custom-sort-items (mapcar (lambda (symbol) @@ -1055,9 +1062,16 @@ ;;;###autoload (defun customize-face-other-window (&optional symbol) - "Show customization buffer for face SYMBOL in other window." - (interactive (list (completing-read "Customize face: " - obarray 'custom-facep t))) + "Show customization buffer for face SYMBOL in other window. + +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)))))) (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) () (if (stringp symbol)