Mercurial > emacs
changeset 68139:058a6e577709
(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.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Thu, 12 Jan 2006 02:25:59 +0000 |
parents | d47ecb3cad92 |
children | 4baa8cfc2485 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 38 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Wed Jan 11 22:30:26 2006 +0000 +++ b/lisp/cus-edit.el Thu Jan 12 02:25:59 2006 +0000 @@ -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 @@ (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 @@ (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 @@ (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) - ("Show value widget" custom-variable-edit + ("Add Comment" custom-comment-show custom-comment-invisible-p) + ("---" ignore ignore) + ("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 @@ (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 + ("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)))) + ("For All Kinds of Displays" custom-face-edit-all (lambda (widget) (not (eq (widget-get widget :custom-form) 'all)))) - ("Show current attributes" custom-face-edit-selected - (lambda (widget) - (not (eq (widget-get widget :custom-form) 'selected)))) - ("Show Lisp expression" custom-face-edit-lisp + ("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 @@ (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 @@ ,(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 ()