summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-03 07:09:29 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-03 07:09:29 +0000
commit95b66edade0906c3278ecbe08b39e0b642ba63ef (patch)
treeb7137b7d1382da3f1e440191987332de415fe630
parentc0b02517bd55fa88fe3d257363bdfcac502af018 (diff)
downloademacs-95b66edade0906c3278ecbe08b39e0b642ba63ef.tar.gz
(custom-buffer-create-internal): New arg DESCRIPTION
is inserted in the buffer to describe it. (custom-buffer-create-other-window, custom-buffer-create): New arg DESCRIBE; pass it along. (customize-group): Pass DESCRIBE argument. (custom-face-menu): Improve Set and Save item strings. (custom-group-menu): Likewise. (custom): Don't set :button-face. (custom-mode): Use custom-button-face here as buffer-local value of widget-button-face.
-rw-r--r--lisp/cus-edit.el35
1 files changed, 22 insertions, 13 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 156b78b793f..eb80e462a24 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -795,7 +795,9 @@ are shown; the contents of those subgroups are initially hidden."
(if (get-buffer name)
(switch-to-buffer name)
(custom-buffer-create (list (list group 'custom-group))
- name))))
+ name
+ (concat " for group "
+ (custom-unlispify-tag-name group))))))
;;;###autoload
(defun customize-group-other-window (symbol)
@@ -976,7 +978,7 @@ links: groups have links to subgroups."
:group 'custom-buffer)
;;;###autoload
-(defun custom-buffer-create (options &optional name)
+(defun custom-buffer-create (options &optional name description)
"Create a buffer containing OPTIONS.
Optional NAME is the name of the buffer.
OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
@@ -985,10 +987,10 @@ that option."
(unless name (setq name "*Customization*"))
(kill-buffer (get-buffer-create name))
(switch-to-buffer (get-buffer-create name))
- (custom-buffer-create-internal options))
+ (custom-buffer-create-internal options description))
;;;###autoload
-(defun custom-buffer-create-other-window (options &optional name)
+(defun custom-buffer-create-other-window (options &optional name description)
"Create a buffer containing OPTIONS.
Optional NAME is the name of the buffer.
OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
@@ -998,7 +1000,7 @@ that option."
(kill-buffer (get-buffer-create name))
(let ((window (selected-window)))
(switch-to-buffer-other-window (get-buffer-create name))
- (custom-buffer-create-internal options)
+ (custom-buffer-create-internal options description)
(select-window window)))
(defcustom custom-reset-button-menu nil
@@ -1007,12 +1009,18 @@ This button will have a menu with all three reset operations."
:type 'boolean
:group 'custom-buffer)
-(defun custom-buffer-create-internal (options)
+(defun custom-buffer-create-internal (options &optional description)
(message "Creating customization buffer...")
(custom-mode)
- (widget-insert "This is a customization buffer.
+ (widget-insert "This is a customization buffer")
+ (if description
+ (widget-insert description))
+ (widget-insert ".
Square brackets show active fields; type RET or click mouse-1
-on an active field to invoke its action. Invoke ")
+on an active field to invoke its action. Editing an option value
+changes the text in the buffer; invoke the State button and
+choose the Set operation to set the option value.
+Invoke ")
(widget-create 'info-link
:tag "Help"
:help-echo "Read the online help."
@@ -1495,7 +1503,6 @@ and `face'."
:value-delete 'widget-children-value-delete
:value-get 'widget-value-value-get
:validate 'widget-children-validate
- :button-face 'custom-button-face
:match (lambda (widget value) (symbolp value)))
(defun custom-convert-widget (widget)
@@ -2277,8 +2284,8 @@ Match frames with dark backgrounds.")
(message "Creating face editor...done"))))))
(defvar custom-face-menu
- '(("Set" custom-face-set)
- ("Save" custom-face-save)
+ '(("Set for Current Session" custom-face-set)
+ ("Save for Future Sessions" custom-face-save)
("Reset to Saved" custom-face-reset-saved
(lambda (widget)
(get (widget-value widget) 'saved-face)))
@@ -2764,10 +2771,10 @@ Creating group members... %2d%%"
(insert "/\n")))))
(defvar custom-group-menu
- '(("Set" custom-group-set
+ '(("Set for Current Session" custom-group-set
(lambda (widget)
(eq (widget-get widget :custom-state) 'modified)))
- ("Save" custom-group-save
+ ("Save for Future Sessions" custom-group-save
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified set))))
("Reset to Current" custom-group-reset-current
@@ -3195,6 +3202,8 @@ if that value is non-nil."
(make-local-variable 'custom-options)
(make-local-variable 'widget-documentation-face)
(setq widget-documentation-face 'custom-documentation-face)
+ (make-local-variable 'widget-button-face)
+ (setq widget-button-face 'custom-button-face)
(make-local-hook 'widget-edit-functions)
(add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
(run-hooks 'custom-mode-hook))