comparison lisp/cus-edit.el @ 67749:1607dd4159f5

(custom-reset-menu, custom-magic-alist, Custom-mode-menu): Say "standard values". (Custom-reset-standard): Doc fix. (custom-face-reset-standard): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Fri, 23 Dec 2005 01:38:49 +0000
parents 3b325979ccee
children 118df638c3ff
comparison
equal deleted inserted replaced
67748:03d7253839de 67749:1607dd4159f5
764 (custom-save-all)) 764 (custom-save-all))
765 765
766 (defvar custom-reset-menu 766 (defvar custom-reset-menu
767 '(("Current" . Custom-reset-current) 767 '(("Current" . Custom-reset-current)
768 ("Saved" . Custom-reset-saved) 768 ("Saved" . Custom-reset-saved)
769 ("Erase Customization (use standard settings)" . Custom-reset-standard)) 769 ("Erase Customization (use standard values)" . Custom-reset-standard))
770 "Alist of actions for the `Reset' button. 770 "Alist of actions for the `Reset' button.
771 The key is a string containing the name of the action, the value is a 771 The key is a string containing the name of the action, the value is a
772 Lisp function taking the widget as an element which will be called 772 Lisp function taking the widget as an element which will be called
773 when the action is chosen.") 773 when the action is chosen.")
774 774
801 (widget-apply widget :custom-reset-saved))) 801 (widget-apply widget :custom-reset-saved)))
802 children))) 802 children)))
803 803
804 (defun Custom-reset-standard (&rest ignore) 804 (defun Custom-reset-standard (&rest ignore)
805 "Erase all customization (either current or saved) for the group members. 805 "Erase all customization (either current or saved) for the group members.
806 The immediate result is to restore them to their standard settings. 806 The immediate result is to restore them to their standard values.
807 This operation eliminates any saved settings for the group members, 807 This operation eliminates any saved values for the group members,
808 making them as if they had never been customized at all." 808 making them as if they had never been customized at all."
809 (interactive) 809 (interactive)
810 (let ((children custom-options)) 810 (let ((children custom-options))
811 (when (or (and (= 1 (length children)) 811 (when (or (and (= 1 (length children))
812 (memq (widget-type (car children)) 812 (memq (widget-type (car children))
1778 (rogue "@" custom-rogue "\ 1778 (rogue "@" custom-rogue "\
1779 NO CUSTOMIZATION DATA; not intended to be customized." "\ 1779 NO CUSTOMIZATION DATA; not intended to be customized." "\
1780 something in this group is not prepared for customization.") 1780 something in this group is not prepared for customization.")
1781 (standard " " nil "\ 1781 (standard " " nil "\
1782 STANDARD." "\ 1782 STANDARD." "\
1783 visible group members are all at standard settings.")) 1783 visible group members are all at standard values."))
1784 "Alist of customize option states. 1784 "Alist of customize option states.
1785 Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where 1785 Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where
1786 1786
1787 STATE is one of the following symbols: 1787 STATE is one of the following symbols:
1788 1788
3400 3400
3401 (defun custom-face-standard-value (widget) 3401 (defun custom-face-standard-value (widget)
3402 (get (widget-value widget) 'face-defface-spec)) 3402 (get (widget-value widget) 'face-defface-spec))
3403 3403
3404 (defun custom-face-reset-standard (widget) 3404 (defun custom-face-reset-standard (widget)
3405 "Restore WIDGET to the face's standard settings. 3405 "Restore WIDGET to the face's standard attribute values.
3406 This operation eliminates any saved setting for the face, 3406 This operation eliminates any saved attributes for the face,
3407 restoring it to the state of a face that has never been customized." 3407 restoring it to the state of a face that has never been customized."
3408 (let* ((symbol (widget-value widget)) 3408 (let* ((symbol (widget-value widget))
3409 (child (car (widget-get widget :children))) 3409 (child (car (widget-get widget :children)))
3410 (value (get symbol 'face-defface-spec)) 3410 (value (get symbol 'face-defface-spec))
3411 (comment-widget (widget-get widget :comment-widget))) 3411 (comment-widget (widget-get widget :comment-widget)))
4339 ,(customize-menu-create 'customize) 4339 ,(customize-menu-create 'customize)
4340 ["Set" Custom-set t] 4340 ["Set" Custom-set t]
4341 ["Save" Custom-save t] 4341 ["Save" Custom-save t]
4342 ["Reset to Current" Custom-reset-current t] 4342 ["Reset to Current" Custom-reset-current t]
4343 ["Reset to Saved" Custom-reset-saved t] 4343 ["Reset to Saved" Custom-reset-saved t]
4344 ["Reset to Standard Settings" Custom-reset-standard t] 4344 ["Reset to Standard Values" Custom-reset-standard t]
4345 ["Info" (info "(emacs)Easy Customization") t])) 4345 ["Info" (info "(emacs)Easy Customization") t]))
4346 4346
4347 (defun Custom-goto-parent () 4347 (defun Custom-goto-parent ()
4348 "Go to the parent group listed at the top of this buffer. 4348 "Go to the parent group listed at the top of this buffer.
4349 If several parents are listed, go to the first of them." 4349 If several parents are listed, go to the first of them."