Commit 70482877 authored by Luc Teirlinck's avatar Luc Teirlinck
Browse files

(custom-reset-menu, custom-buffer-create-internal)

(custom-variable-menu, custom-face-menu, custom-group-menu)
(Custom-mode-menu): Change names of menu items.  (As discussed on emacs-devel.)
(custom-face-menu): Add "Undo Edits" item.
parent 23e0c1a3
......@@ -88,7 +88,7 @@
;; compatibility.
;; You can see (and modify and save) this unevaluated value by selecting
;; "Show initial Lisp expression" from the Lisp interface. This will
;; "Show Saved Lisp Expression" from the Lisp interface. This will
;; give you the unevaluated saved value, if any, otherwise the
;; unevaluated standard value.
......@@ -770,8 +770,8 @@ If a setting was merely edited before, this sets it then saves it."
(message "Aborted")))
(defvar custom-reset-menu
'(("Reset to current settings" . Custom-reset-current)
("Reset to saved settings" . Custom-reset-saved)
'(("Undo Edits" . Custom-reset-current)
("Reset to Saved" . Custom-reset-saved)
("Erase Customization (use standard values)" . Custom-reset-standard))
"Alist of actions for the `Reset' button.
The key is a string containing the name of the action, the value is a
......@@ -1509,7 +1509,7 @@ This updates your Emacs initialization file or creates a new one."
(custom-reset event))))
(widget-insert "\n ")
(widget-create 'push-button
:tag "Reset to Current"
:tag "Undo Edits"
:help-echo "\
Reset all edited text in this buffer to reflect current values."
:action 'Custom-reset-current)
......@@ -2628,40 +2628,40 @@ Otherwise, look up symbol in `custom-guess-type-alist'."
(get (widget-value widget) 'standard-value))
(defvar custom-variable-menu
`(("Set for current session" custom-variable-set
`(("Set for Current Session" custom-variable-set
(lambda (widget)
(eq (widget-get widget :custom-state) 'modified)))
,@(when (or custom-file user-init-file)
'(("Save for future sessions" custom-variable-save
'(("Save for Future Sessions" custom-variable-save
(lambda (widget)
(memq (widget-get widget :custom-state)
'(modified set changed rogue))))))
("---" ignore ignore)
("Reset to current value" custom-redraw
("Undo Edits" custom-redraw
(lambda (widget)
(and (default-boundp (widget-value widget))
(memq (widget-get widget :custom-state) '(modified changed)))))
("Reset to saved value" custom-variable-reset-saved
("Reset to Saved" custom-variable-reset-saved
(lambda (widget)
(and (or (get (widget-value widget) 'saved-value)
(get (widget-value widget) 'saved-variable-comment))
(memq (widget-get widget :custom-state)
'(modified set changed rogue)))))
("Reset to backup value" custom-variable-reset-backup
(lambda (widget)
(get (widget-value widget) 'backup-value)))
,@(when (or custom-file user-init-file)
'(("Erase customization" custom-variable-reset-standard
'(("Erase Customization" custom-variable-reset-standard
(lambda (widget)
(and (get (widget-value widget) 'standard-value)
(memq (widget-get widget :custom-state)
'(modified set changed saved rogue)))))))
("Set to Backup Value" custom-variable-reset-backup
(lambda (widget)
(get (widget-value widget) 'backup-value)))
("---" ignore ignore)
("Add Comment" custom-comment-show custom-comment-invisible-p)
("---" ignore ignore)
("Add comment" custom-comment-show custom-comment-invisible-p)
("Show value widget" custom-variable-edit
("Show Current Value" custom-variable-edit
(lambda (widget)
(eq (widget-get widget :custom-form) 'lisp)))
("Show Lisp expression" custom-variable-edit-lisp
("Show Saved Lisp Expression" custom-variable-edit-lisp
(lambda (widget)
(eq (widget-get widget :custom-form) 'edit))))
"Alist of actions for the `custom-variable' widget.
......@@ -3302,27 +3302,30 @@ SPEC must be a full face spec."
(message "Creating face editor...done"))))))
(defvar custom-face-menu
`(("Set for current session" custom-face-set)
`(("Set for Current Session" custom-face-set)
,@(when (or custom-file user-init-file)
'(("Save for future sessions" custom-face-save-command)))
("---" ignore ignore)
("Reset to saved face" custom-face-reset-saved
'(("Save for Future Sessions" custom-face-save-command)))
("Undo Edits" custom-redraw
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified changed))))
("Reset to Saved" custom-face-reset-saved
(lambda (widget)
(or (get (widget-value widget) 'saved-face)
(get (widget-value widget) 'saved-face-comment))))
,@(when (or custom-file user-init-file)
'(("Erase customization" custom-face-reset-standard
'(("Erase Customization" custom-face-reset-standard
(lambda (widget)
(get (widget-value widget) 'face-defface-spec)))))
("---" ignore ignore)
("Add comment" custom-comment-show custom-comment-invisible-p)
("Show all attributes" custom-face-edit-all
(lambda (widget)
(not (eq (widget-get widget :custom-form) 'all))))
("Show current attributes" custom-face-edit-selected
("Add Comment" custom-comment-show custom-comment-invisible-p)
("---" ignore ignore)
("For Current Display" custom-face-edit-selected
(lambda (widget)
(not (eq (widget-get widget :custom-form) 'selected))))
("Show Lisp expression" custom-face-edit-lisp
("For All Kinds of Displays" custom-face-edit-all
(lambda (widget)
(not (eq (widget-get widget :custom-form) 'all))))
("Show Lisp Expression" custom-face-edit-lisp
(lambda (widget)
(not (eq (widget-get widget :custom-form) 'lisp)))))
"Alist of actions for the `custom-face' widget.
......@@ -3900,22 +3903,21 @@ Creating group members... %2d%%"
(insert "/\n")))))
(defvar custom-group-menu
`(("Set for current session" custom-group-set
`(("Set for Current Session" custom-group-set
(lambda (widget)
(eq (widget-get widget :custom-state) 'modified)))
,@(when (or custom-file user-init-file)
'(("Save for future sessions" custom-group-save
'(("Save for Future Sessions" custom-group-save
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified set))))))
("---" ignore ignore)
("Reset to current settings" custom-group-reset-current
("Undo Edits" custom-group-reset-current
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified))))
("Reset to saved settings" custom-group-reset-saved
("Reset to Saved" custom-group-reset-saved
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified set))))
,@(when (or custom-file user-init-file)
'(("Reset to standard settings" custom-group-reset-standard
'(("Erase Customization" custom-group-reset-standard
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified set saved)))))))
"Alist of actions for the `custom-group' widget.
......@@ -4374,9 +4376,9 @@ The format is suitable for use with `easy-menu-define'."
,(customize-menu-create 'customize)
["Set" Custom-set t]
["Save" Custom-save t]
["Reset to current settings" Custom-reset-current t]
["Reset to saved settings" Custom-reset-saved t]
["Erase customizations" Custom-reset-standard t]
["Undo Edits" Custom-reset-current t]
["Reset to Saved" Custom-reset-saved t]
["Erase Customization" Custom-reset-standard t]
["Info" (info "(emacs)Easy Customization") t]))
(defun Custom-goto-parent ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment