diff options
| author | Luc Teirlinck | 2006-01-12 02:25:59 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2006-01-12 02:25:59 +0000 |
| commit | 70482877f532d75f7fc038e5299ad66de7da3378 (patch) | |
| tree | 101b3717883897d146e4344336653f5a753f9b85 | |
| parent | 23e0c1a3bc240a544bdc3069a37ece1ca8d4b891 (diff) | |
| download | emacs-70482877f532d75f7fc038e5299ad66de7da3378.tar.gz emacs-70482877f532d75f7fc038e5299ad66de7da3378.zip | |
(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.
| -rw-r--r-- | lisp/cus-edit.el | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 2928080ca4e..2d4603d6dd1 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -88,7 +88,7 @@ | |||
| 88 | ;; compatibility. | 88 | ;; compatibility. |
| 89 | 89 | ||
| 90 | ;; You can see (and modify and save) this unevaluated value by selecting | 90 | ;; You can see (and modify and save) this unevaluated value by selecting |
| 91 | ;; "Show initial Lisp expression" from the Lisp interface. This will | 91 | ;; "Show Saved Lisp Expression" from the Lisp interface. This will |
| 92 | ;; give you the unevaluated saved value, if any, otherwise the | 92 | ;; give you the unevaluated saved value, if any, otherwise the |
| 93 | ;; unevaluated standard value. | 93 | ;; unevaluated standard value. |
| 94 | 94 | ||
| @@ -770,8 +770,8 @@ If a setting was merely edited before, this sets it then saves it." | |||
| 770 | (message "Aborted"))) | 770 | (message "Aborted"))) |
| 771 | 771 | ||
| 772 | (defvar custom-reset-menu | 772 | (defvar custom-reset-menu |
| 773 | '(("Reset to current settings" . Custom-reset-current) | 773 | '(("Undo Edits" . Custom-reset-current) |
| 774 | ("Reset to saved settings" . Custom-reset-saved) | 774 | ("Reset to Saved" . Custom-reset-saved) |
| 775 | ("Erase Customization (use standard values)" . Custom-reset-standard)) | 775 | ("Erase Customization (use standard values)" . Custom-reset-standard)) |
| 776 | "Alist of actions for the `Reset' button. | 776 | "Alist of actions for the `Reset' button. |
| 777 | The key is a string containing the name of the action, the value is a | 777 | 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." | |||
| 1509 | (custom-reset event)))) | 1509 | (custom-reset event)))) |
| 1510 | (widget-insert "\n ") | 1510 | (widget-insert "\n ") |
| 1511 | (widget-create 'push-button | 1511 | (widget-create 'push-button |
| 1512 | :tag "Reset to Current" | 1512 | :tag "Undo Edits" |
| 1513 | :help-echo "\ | 1513 | :help-echo "\ |
| 1514 | Reset all edited text in this buffer to reflect current values." | 1514 | Reset all edited text in this buffer to reflect current values." |
| 1515 | :action 'Custom-reset-current) | 1515 | :action 'Custom-reset-current) |
| @@ -2628,40 +2628,40 @@ Otherwise, look up symbol in `custom-guess-type-alist'." | |||
| 2628 | (get (widget-value widget) 'standard-value)) | 2628 | (get (widget-value widget) 'standard-value)) |
| 2629 | 2629 | ||
| 2630 | (defvar custom-variable-menu | 2630 | (defvar custom-variable-menu |
| 2631 | `(("Set for current session" custom-variable-set | 2631 | `(("Set for Current Session" custom-variable-set |
| 2632 | (lambda (widget) | 2632 | (lambda (widget) |
| 2633 | (eq (widget-get widget :custom-state) 'modified))) | 2633 | (eq (widget-get widget :custom-state) 'modified))) |
| 2634 | ,@(when (or custom-file user-init-file) | 2634 | ,@(when (or custom-file user-init-file) |
| 2635 | '(("Save for future sessions" custom-variable-save | 2635 | '(("Save for Future Sessions" custom-variable-save |
| 2636 | (lambda (widget) | 2636 | (lambda (widget) |
| 2637 | (memq (widget-get widget :custom-state) | 2637 | (memq (widget-get widget :custom-state) |
| 2638 | '(modified set changed rogue)))))) | 2638 | '(modified set changed rogue)))))) |
| 2639 | ("---" ignore ignore) | 2639 | ("Undo Edits" custom-redraw |
| 2640 | ("Reset to current value" custom-redraw | ||
| 2641 | (lambda (widget) | 2640 | (lambda (widget) |
| 2642 | (and (default-boundp (widget-value widget)) | 2641 | (and (default-boundp (widget-value widget)) |
| 2643 | (memq (widget-get widget :custom-state) '(modified changed))))) | 2642 | (memq (widget-get widget :custom-state) '(modified changed))))) |
| 2644 | ("Reset to saved value" custom-variable-reset-saved | 2643 | ("Reset to Saved" custom-variable-reset-saved |
| 2645 | (lambda (widget) | 2644 | (lambda (widget) |
| 2646 | (and (or (get (widget-value widget) 'saved-value) | 2645 | (and (or (get (widget-value widget) 'saved-value) |
| 2647 | (get (widget-value widget) 'saved-variable-comment)) | 2646 | (get (widget-value widget) 'saved-variable-comment)) |
| 2648 | (memq (widget-get widget :custom-state) | 2647 | (memq (widget-get widget :custom-state) |
| 2649 | '(modified set changed rogue))))) | 2648 | '(modified set changed rogue))))) |
| 2650 | ("Reset to backup value" custom-variable-reset-backup | ||
| 2651 | (lambda (widget) | ||
| 2652 | (get (widget-value widget) 'backup-value))) | ||
| 2653 | ,@(when (or custom-file user-init-file) | 2649 | ,@(when (or custom-file user-init-file) |
| 2654 | '(("Erase customization" custom-variable-reset-standard | 2650 | '(("Erase Customization" custom-variable-reset-standard |
| 2655 | (lambda (widget) | 2651 | (lambda (widget) |
| 2656 | (and (get (widget-value widget) 'standard-value) | 2652 | (and (get (widget-value widget) 'standard-value) |
| 2657 | (memq (widget-get widget :custom-state) | 2653 | (memq (widget-get widget :custom-state) |
| 2658 | '(modified set changed saved rogue))))))) | 2654 | '(modified set changed saved rogue))))))) |
| 2655 | ("Set to Backup Value" custom-variable-reset-backup | ||
| 2656 | (lambda (widget) | ||
| 2657 | (get (widget-value widget) 'backup-value))) | ||
| 2658 | ("---" ignore ignore) | ||
| 2659 | ("Add Comment" custom-comment-show custom-comment-invisible-p) | ||
| 2659 | ("---" ignore ignore) | 2660 | ("---" ignore ignore) |
| 2660 | ("Add comment" custom-comment-show custom-comment-invisible-p) | 2661 | ("Show Current Value" custom-variable-edit |
| 2661 | ("Show value widget" custom-variable-edit | ||
| 2662 | (lambda (widget) | 2662 | (lambda (widget) |
| 2663 | (eq (widget-get widget :custom-form) 'lisp))) | 2663 | (eq (widget-get widget :custom-form) 'lisp))) |
| 2664 | ("Show Lisp expression" custom-variable-edit-lisp | 2664 | ("Show Saved Lisp Expression" custom-variable-edit-lisp |
| 2665 | (lambda (widget) | 2665 | (lambda (widget) |
| 2666 | (eq (widget-get widget :custom-form) 'edit)))) | 2666 | (eq (widget-get widget :custom-form) 'edit)))) |
| 2667 | "Alist of actions for the `custom-variable' widget. | 2667 | "Alist of actions for the `custom-variable' widget. |
| @@ -3302,27 +3302,30 @@ SPEC must be a full face spec." | |||
| 3302 | (message "Creating face editor...done")))))) | 3302 | (message "Creating face editor...done")))))) |
| 3303 | 3303 | ||
| 3304 | (defvar custom-face-menu | 3304 | (defvar custom-face-menu |
| 3305 | `(("Set for current session" custom-face-set) | 3305 | `(("Set for Current Session" custom-face-set) |
| 3306 | ,@(when (or custom-file user-init-file) | 3306 | ,@(when (or custom-file user-init-file) |
| 3307 | '(("Save for future sessions" custom-face-save-command))) | 3307 | '(("Save for Future Sessions" custom-face-save-command))) |
| 3308 | ("---" ignore ignore) | 3308 | ("Undo Edits" custom-redraw |
| 3309 | ("Reset to saved face" custom-face-reset-saved | 3309 | (lambda (widget) |
| 3310 | (memq (widget-get widget :custom-state) '(modified changed)))) | ||
| 3311 | ("Reset to Saved" custom-face-reset-saved | ||
| 3310 | (lambda (widget) | 3312 | (lambda (widget) |
| 3311 | (or (get (widget-value widget) 'saved-face) | 3313 | (or (get (widget-value widget) 'saved-face) |
| 3312 | (get (widget-value widget) 'saved-face-comment)))) | 3314 | (get (widget-value widget) 'saved-face-comment)))) |
| 3313 | ,@(when (or custom-file user-init-file) | 3315 | ,@(when (or custom-file user-init-file) |
| 3314 | '(("Erase customization" custom-face-reset-standard | 3316 | '(("Erase Customization" custom-face-reset-standard |
| 3315 | (lambda (widget) | 3317 | (lambda (widget) |
| 3316 | (get (widget-value widget) 'face-defface-spec))))) | 3318 | (get (widget-value widget) 'face-defface-spec))))) |
| 3317 | ("---" ignore ignore) | 3319 | ("---" ignore ignore) |
| 3318 | ("Add comment" custom-comment-show custom-comment-invisible-p) | 3320 | ("Add Comment" custom-comment-show custom-comment-invisible-p) |
| 3319 | ("Show all attributes" custom-face-edit-all | 3321 | ("---" ignore ignore) |
| 3320 | (lambda (widget) | 3322 | ("For Current Display" custom-face-edit-selected |
| 3321 | (not (eq (widget-get widget :custom-form) 'all)))) | ||
| 3322 | ("Show current attributes" custom-face-edit-selected | ||
| 3323 | (lambda (widget) | 3323 | (lambda (widget) |
| 3324 | (not (eq (widget-get widget :custom-form) 'selected)))) | 3324 | (not (eq (widget-get widget :custom-form) 'selected)))) |
| 3325 | ("Show Lisp expression" custom-face-edit-lisp | 3325 | ("For All Kinds of Displays" custom-face-edit-all |
| 3326 | (lambda (widget) | ||
| 3327 | (not (eq (widget-get widget :custom-form) 'all)))) | ||
| 3328 | ("Show Lisp Expression" custom-face-edit-lisp | ||
| 3326 | (lambda (widget) | 3329 | (lambda (widget) |
| 3327 | (not (eq (widget-get widget :custom-form) 'lisp))))) | 3330 | (not (eq (widget-get widget :custom-form) 'lisp))))) |
| 3328 | "Alist of actions for the `custom-face' widget. | 3331 | "Alist of actions for the `custom-face' widget. |
| @@ -3900,22 +3903,21 @@ Creating group members... %2d%%" | |||
| 3900 | (insert "/\n"))))) | 3903 | (insert "/\n"))))) |
| 3901 | 3904 | ||
| 3902 | (defvar custom-group-menu | 3905 | (defvar custom-group-menu |
| 3903 | `(("Set for current session" custom-group-set | 3906 | `(("Set for Current Session" custom-group-set |
| 3904 | (lambda (widget) | 3907 | (lambda (widget) |
| 3905 | (eq (widget-get widget :custom-state) 'modified))) | 3908 | (eq (widget-get widget :custom-state) 'modified))) |
| 3906 | ,@(when (or custom-file user-init-file) | 3909 | ,@(when (or custom-file user-init-file) |
| 3907 | '(("Save for future sessions" custom-group-save | 3910 | '(("Save for Future Sessions" custom-group-save |
| 3908 | (lambda (widget) | 3911 | (lambda (widget) |
| 3909 | (memq (widget-get widget :custom-state) '(modified set)))))) | 3912 | (memq (widget-get widget :custom-state) '(modified set)))))) |
| 3910 | ("---" ignore ignore) | 3913 | ("Undo Edits" custom-group-reset-current |
| 3911 | ("Reset to current settings" custom-group-reset-current | ||
| 3912 | (lambda (widget) | 3914 | (lambda (widget) |
| 3913 | (memq (widget-get widget :custom-state) '(modified)))) | 3915 | (memq (widget-get widget :custom-state) '(modified)))) |
| 3914 | ("Reset to saved settings" custom-group-reset-saved | 3916 | ("Reset to Saved" custom-group-reset-saved |
| 3915 | (lambda (widget) | 3917 | (lambda (widget) |
| 3916 | (memq (widget-get widget :custom-state) '(modified set)))) | 3918 | (memq (widget-get widget :custom-state) '(modified set)))) |
| 3917 | ,@(when (or custom-file user-init-file) | 3919 | ,@(when (or custom-file user-init-file) |
| 3918 | '(("Reset to standard settings" custom-group-reset-standard | 3920 | '(("Erase Customization" custom-group-reset-standard |
| 3919 | (lambda (widget) | 3921 | (lambda (widget) |
| 3920 | (memq (widget-get widget :custom-state) '(modified set saved))))))) | 3922 | (memq (widget-get widget :custom-state) '(modified set saved))))))) |
| 3921 | "Alist of actions for the `custom-group' widget. | 3923 | "Alist of actions for the `custom-group' widget. |
| @@ -4374,9 +4376,9 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4374 | ,(customize-menu-create 'customize) | 4376 | ,(customize-menu-create 'customize) |
| 4375 | ["Set" Custom-set t] | 4377 | ["Set" Custom-set t] |
| 4376 | ["Save" Custom-save t] | 4378 | ["Save" Custom-save t] |
| 4377 | ["Reset to current settings" Custom-reset-current t] | 4379 | ["Undo Edits" Custom-reset-current t] |
| 4378 | ["Reset to saved settings" Custom-reset-saved t] | 4380 | ["Reset to Saved" Custom-reset-saved t] |
| 4379 | ["Erase customizations" Custom-reset-standard t] | 4381 | ["Erase Customization" Custom-reset-standard t] |
| 4380 | ["Info" (info "(emacs)Easy Customization") t])) | 4382 | ["Info" (info "(emacs)Easy Customization") t])) |
| 4381 | 4383 | ||
| 4382 | (defun Custom-goto-parent () | 4384 | (defun Custom-goto-parent () |