diff options
| author | Chong Yidong | 2006-01-04 17:23:23 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-01-04 17:23:23 +0000 |
| commit | 0c7310460cf5b79814d79fa7c1b00cedff18ccf8 (patch) | |
| tree | e7ec434fe5928fe344f9f1a5cc3d96f3fbb80623 | |
| parent | 73e60f534c975124124973b03fa76072a769b6c6 (diff) | |
| download | emacs-0c7310460cf5b79814d79fa7c1b00cedff18ccf8.tar.gz emacs-0c7310460cf5b79814d79fa7c1b00cedff18ccf8.zip | |
* cus-edit.el (custom-reset-menu, Custom-mode-menu)
(custom-variable-menu, custom-face-menu, custom-group-menu):
Undo last change.
(Custom-reset-current, Custom-reset-saved)
(Custom-reset-standard): Fix y-or-n-p messages.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 63 |
2 files changed, 38 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12f6295ee75..22d3d816b35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | 2006-01-04 Chong Yidong <cyd@stupidchicken.com> | 1 | 2006-01-04 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * cus-edit.el (custom-reset-menu, custom-reset, Custom-mode-menu) | 3 | * cus-edit.el (custom-reset-menu, Custom-mode-menu) |
| 4 | (custom-variable-menu, custom-face-menu, custom-group-menu) | 4 | (custom-variable-menu, custom-face-menu, custom-group-menu): |
| 5 | (custom-buffer-create-internal): Change "Reset" to "Show". | ||
| 6 | Reorder menu items. | 5 | Reorder menu items. |
| 7 | (custom-link): New face for Info links. | 6 | (Custom-reset-current, Custom-reset-saved) |
| 7 | (Custom-reset-standard): Fix y-or-n-p messages. | ||
| 8 | (custom-link): New face for links. | ||
| 8 | (custom-buffer-create-internal, custom-manual): Use it. | 9 | (custom-buffer-create-internal, custom-manual): Use it. |
| 9 | 10 | ||
| 10 | * wid-edit.el (widget-default-mouse-face-get): New function. | 11 | * wid-edit.el (widget-default-mouse-face-get): New function. |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 08b66cb7e9e..678fc71f621 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -768,8 +768,8 @@ groups after non-groups, if nil do not order groups at all." | |||
| 768 | (message "Aborted"))) | 768 | (message "Aborted"))) |
| 769 | 769 | ||
| 770 | (defvar custom-reset-menu | 770 | (defvar custom-reset-menu |
| 771 | '(("Show current settings" . Custom-reset-current) | 771 | '(("Reset to current settings" . Custom-reset-current) |
| 772 | ("Show saved settings" . Custom-reset-saved) | 772 | ("Reset to saved settings" . Custom-reset-saved) |
| 773 | ("Erase Customization (use standard values)" . Custom-reset-standard)) | 773 | ("Erase Customization (use standard values)" . Custom-reset-standard)) |
| 774 | "Alist of actions for the `Reset' button. | 774 | "Alist of actions for the `Reset' button. |
| 775 | The key is a string containing the name of the action, the value is a | 775 | The key is a string containing the name of the action, the value is a |
| @@ -788,7 +788,7 @@ when the action is chosen.") | |||
| 788 | (defun Custom-reset-current (&rest ignore) | 788 | (defun Custom-reset-current (&rest ignore) |
| 789 | "Reset all modified group members to their current value." | 789 | "Reset all modified group members to their current value." |
| 790 | (interactive) | 790 | (interactive) |
| 791 | (if (y-or-n-p "Update buffer text to show all current settings? ") | 791 | (if (y-or-n-p "Reset buffer to show current settings? ") |
| 792 | (let ((children custom-options)) | 792 | (let ((children custom-options)) |
| 793 | (mapc (lambda (widget) | 793 | (mapc (lambda (widget) |
| 794 | (if (memq (widget-get widget :custom-state) | 794 | (if (memq (widget-get widget :custom-state) |
| @@ -800,7 +800,7 @@ when the action is chosen.") | |||
| 800 | (defun Custom-reset-saved (&rest ignore) | 800 | (defun Custom-reset-saved (&rest ignore) |
| 801 | "Reset all modified or set group members to their saved value." | 801 | "Reset all modified or set group members to their saved value." |
| 802 | (interactive) | 802 | (interactive) |
| 803 | (if (y-or-n-p "Update buffer text to show all saved settings? ") | 803 | (if (y-or-n-p "Reset all settings to saved values? ") |
| 804 | (let ((children custom-options)) | 804 | (let ((children custom-options)) |
| 805 | (mapc (lambda (widget) | 805 | (mapc (lambda (widget) |
| 806 | (if (memq (widget-get widget :custom-state) | 806 | (if (memq (widget-get widget :custom-state) |
| @@ -819,7 +819,7 @@ making them as if they had never been customized at all." | |||
| 819 | (if (or (and (= 1 (length children)) | 819 | (if (or (and (= 1 (length children)) |
| 820 | (memq (widget-type (car children)) | 820 | (memq (widget-type (car children)) |
| 821 | '(custom-variable custom-face))) | 821 | '(custom-variable custom-face))) |
| 822 | (yes-or-no-p "Really erase all customizations in this buffer? ")) | 822 | (yes-or-no-p "Erase all customizations in this buffer? ")) |
| 823 | (mapc (lambda (widget) | 823 | (mapc (lambda (widget) |
| 824 | (and (if (widget-get widget :custom-standard-value) | 824 | (and (if (widget-get widget :custom-standard-value) |
| 825 | (widget-apply widget :custom-standard-value) | 825 | (widget-apply widget :custom-standard-value) |
| @@ -1482,13 +1482,13 @@ See ") | |||
| 1482 | (custom-reset event)))) | 1482 | (custom-reset event)))) |
| 1483 | (widget-insert "\n ") | 1483 | (widget-insert "\n ") |
| 1484 | (widget-create 'push-button | 1484 | (widget-create 'push-button |
| 1485 | :tag "Show Current Settings" | 1485 | :tag "Reset to Current" |
| 1486 | :help-echo "\ | 1486 | :help-echo "\ |
| 1487 | Reset all edited text in this buffer to reflect current values." | 1487 | Reset all edited text in this buffer to reflect current values." |
| 1488 | :action 'Custom-reset-current) | 1488 | :action 'Custom-reset-current) |
| 1489 | (widget-insert " ") | 1489 | (widget-insert " ") |
| 1490 | (widget-create 'push-button | 1490 | (widget-create 'push-button |
| 1491 | :tag "Show Saved Settings" | 1491 | :tag "Reset to Saved" |
| 1492 | :help-echo "\ | 1492 | :help-echo "\ |
| 1493 | Reset all settings in this buffer to their saved values." | 1493 | Reset all settings in this buffer to their saved values." |
| 1494 | :action 'Custom-reset-saved) | 1494 | :action 'Custom-reset-saved) |
| @@ -1497,7 +1497,7 @@ Reset all settings in this buffer to their saved values." | |||
| 1497 | (widget-create 'push-button | 1497 | (widget-create 'push-button |
| 1498 | :tag "Erase Customization" | 1498 | :tag "Erase Customization" |
| 1499 | :help-echo "\ | 1499 | :help-echo "\ |
| 1500 | Un-customize all settings in this buffer--save them with standard values." | 1500 | Un-customize all settings in this buffer and save them with standard values." |
| 1501 | :action 'Custom-reset-standard))) | 1501 | :action 'Custom-reset-standard))) |
| 1502 | (widget-insert "\n ") | 1502 | (widget-insert "\n ") |
| 1503 | (widget-create 'push-button | 1503 | (widget-create 'push-button |
| @@ -2227,6 +2227,8 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | |||
| 2227 | (insert " ") | 2227 | (insert " ") |
| 2228 | (push (widget-create-child-and-convert | 2228 | (push (widget-create-child-and-convert |
| 2229 | widget 'custom-group-link | 2229 | widget 'custom-group-link |
| 2230 | :button-face 'custom-link | ||
| 2231 | :mouse-face 'highlight | ||
| 2230 | :tag (custom-unlispify-tag-name symbol) | 2232 | :tag (custom-unlispify-tag-name symbol) |
| 2231 | symbol) | 2233 | symbol) |
| 2232 | buttons) | 2234 | buttons) |
| @@ -2621,28 +2623,28 @@ Otherwise, look up symbol in `custom-guess-type-alist'." | |||
| 2621 | (get (widget-value widget) 'standard-value)) | 2623 | (get (widget-value widget) 'standard-value)) |
| 2622 | 2624 | ||
| 2623 | (defvar custom-variable-menu | 2625 | (defvar custom-variable-menu |
| 2624 | `(("Show current value" custom-redraw | 2626 | `(("Add comment" custom-comment-show custom-comment-invisible-p) |
| 2627 | ("Show value widget" custom-variable-edit | ||
| 2628 | (lambda (widget) | ||
| 2629 | (eq (widget-get widget :custom-form) 'lisp))) | ||
| 2630 | ("Show Lisp expression" custom-variable-edit-lisp | ||
| 2631 | (lambda (widget) | ||
| 2632 | (eq (widget-get widget :custom-form) 'edit))) | ||
| 2633 | ("---" ignore ignore) | ||
| 2634 | ("Reset to current value" custom-redraw | ||
| 2625 | (lambda (widget) | 2635 | (lambda (widget) |
| 2626 | (and (default-boundp (widget-value widget)) | 2636 | (and (default-boundp (widget-value widget)) |
| 2627 | (memq (widget-get widget :custom-state) '(modified changed))))) | 2637 | (memq (widget-get widget :custom-state) '(modified changed))))) |
| 2628 | ("Show saved value" custom-variable-reset-saved | 2638 | ("Reset to saved value" custom-variable-reset-saved |
| 2629 | (lambda (widget) | 2639 | (lambda (widget) |
| 2630 | (and (or (get (widget-value widget) 'saved-value) | 2640 | (and (or (get (widget-value widget) 'saved-value) |
| 2631 | (get (widget-value widget) 'saved-variable-comment)) | 2641 | (get (widget-value widget) 'saved-variable-comment)) |
| 2632 | (memq (widget-get widget :custom-state) | 2642 | (memq (widget-get widget :custom-state) |
| 2633 | '(modified set changed rogue))))) | 2643 | '(modified set changed rogue))))) |
| 2634 | ("Show backup value" custom-variable-reset-backup | 2644 | ("Reset to backup value" custom-variable-reset-backup |
| 2635 | (lambda (widget) | 2645 | (lambda (widget) |
| 2636 | (get (widget-value widget) 'backup-value))) | 2646 | (get (widget-value widget) 'backup-value))) |
| 2637 | ("---" ignore ignore) | 2647 | ("---" ignore ignore) |
| 2638 | ("Add comment" custom-comment-show custom-comment-invisible-p) | ||
| 2639 | ("Show value widget" custom-variable-edit | ||
| 2640 | (lambda (widget) | ||
| 2641 | (eq (widget-get widget :custom-form) 'lisp))) | ||
| 2642 | ("Show Lisp expression" custom-variable-edit-lisp | ||
| 2643 | (lambda (widget) | ||
| 2644 | (eq (widget-get widget :custom-form) 'edit))) | ||
| 2645 | ("---" ignore ignore) | ||
| 2646 | ,@(when (or custom-file user-init-file) | 2648 | ,@(when (or custom-file user-init-file) |
| 2647 | '(("Erase customization" custom-variable-reset-standard | 2649 | '(("Erase customization" custom-variable-reset-standard |
| 2648 | (lambda (widget) | 2650 | (lambda (widget) |
| @@ -3294,12 +3296,7 @@ SPEC must be a full face spec." | |||
| 3294 | (message "Creating face editor...done")))))) | 3296 | (message "Creating face editor...done")))))) |
| 3295 | 3297 | ||
| 3296 | (defvar custom-face-menu | 3298 | (defvar custom-face-menu |
| 3297 | `(("Show saved face" custom-face-reset-saved | 3299 | `(("Add comment" custom-comment-show custom-comment-invisible-p) |
| 3298 | (lambda (widget) | ||
| 3299 | (or (get (widget-value widget) 'saved-face) | ||
| 3300 | (get (widget-value widget) 'saved-face-comment)))) | ||
| 3301 | ("---" ignore ignore) | ||
| 3302 | ("Add comment" custom-comment-show custom-comment-invisible-p) | ||
| 3303 | ("Show all attributes" custom-face-edit-all | 3300 | ("Show all attributes" custom-face-edit-all |
| 3304 | (lambda (widget) | 3301 | (lambda (widget) |
| 3305 | (not (eq (widget-get widget :custom-form) 'all)))) | 3302 | (not (eq (widget-get widget :custom-form) 'all)))) |
| @@ -3310,6 +3307,10 @@ SPEC must be a full face spec." | |||
| 3310 | (lambda (widget) | 3307 | (lambda (widget) |
| 3311 | (not (eq (widget-get widget :custom-form) 'lisp)))) | 3308 | (not (eq (widget-get widget :custom-form) 'lisp)))) |
| 3312 | ("---" ignore ignore) | 3309 | ("---" ignore ignore) |
| 3310 | ("Reset to saved face" custom-face-reset-saved | ||
| 3311 | (lambda (widget) | ||
| 3312 | (or (get (widget-value widget) 'saved-face) | ||
| 3313 | (get (widget-value widget) 'saved-face-comment)))) | ||
| 3313 | ,@(when (or custom-file user-init-file) | 3314 | ,@(when (or custom-file user-init-file) |
| 3314 | '(("Erase customization" custom-face-reset-standard | 3315 | '(("Erase customization" custom-face-reset-standard |
| 3315 | (lambda (widget) | 3316 | (lambda (widget) |
| @@ -3775,6 +3776,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups." | |||
| 3775 | (if (eq custom-buffer-style 'links) | 3776 | (if (eq custom-buffer-style 'links) |
| 3776 | (push (widget-create-child-and-convert | 3777 | (push (widget-create-child-and-convert |
| 3777 | widget 'custom-group-link | 3778 | widget 'custom-group-link |
| 3779 | :button-face 'custom-link | ||
| 3780 | :mouse-face 'highlight | ||
| 3778 | :tag "Go to Group" | 3781 | :tag "Go to Group" |
| 3779 | symbol) | 3782 | symbol) |
| 3780 | buttons) | 3783 | buttons) |
| @@ -3890,14 +3893,14 @@ Creating group members... %2d%%" | |||
| 3890 | (insert "/\n"))))) | 3893 | (insert "/\n"))))) |
| 3891 | 3894 | ||
| 3892 | (defvar custom-group-menu | 3895 | (defvar custom-group-menu |
| 3893 | `(("Show current settings" custom-group-reset-current | 3896 | `(("Reset to current settings" custom-group-reset-current |
| 3894 | (lambda (widget) | 3897 | (lambda (widget) |
| 3895 | (memq (widget-get widget :custom-state) '(modified)))) | 3898 | (memq (widget-get widget :custom-state) '(modified)))) |
| 3896 | ("Show saved settings" custom-group-reset-saved | 3899 | ("Reset to saved settings" custom-group-reset-saved |
| 3897 | (lambda (widget) | 3900 | (lambda (widget) |
| 3898 | (memq (widget-get widget :custom-state) '(modified set)))) | 3901 | (memq (widget-get widget :custom-state) '(modified set)))) |
| 3899 | ,@(when (or custom-file user-init-file) | 3902 | ,@(when (or custom-file user-init-file) |
| 3900 | '(("Show standard settings" custom-group-reset-standard | 3903 | '(("Reset to standard settings" custom-group-reset-standard |
| 3901 | (lambda (widget) | 3904 | (lambda (widget) |
| 3902 | (memq (widget-get widget :custom-state) '(modified set saved)))))) | 3905 | (memq (widget-get widget :custom-state) '(modified set saved)))))) |
| 3903 | ("---" ignore ignore) | 3906 | ("---" ignore ignore) |
| @@ -4364,8 +4367,8 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4364 | ,(customize-menu-create 'customize) | 4367 | ,(customize-menu-create 'customize) |
| 4365 | ["Set" Custom-set t] | 4368 | ["Set" Custom-set t] |
| 4366 | ["Save" Custom-save t] | 4369 | ["Save" Custom-save t] |
| 4367 | ["Show current settings" Custom-reset-current t] | 4370 | ["Reset to current settings" Custom-reset-current t] |
| 4368 | ["Show saved settings" Custom-reset-saved t] | 4371 | ["Reset to saved settings" Custom-reset-saved t] |
| 4369 | ["Erase customizations" Custom-reset-standard t] | 4372 | ["Erase customizations" Custom-reset-standard t] |
| 4370 | ["Info" (info "(emacs)Easy Customization") t])) | 4373 | ["Info" (info "(emacs)Easy Customization") t])) |
| 4371 | 4374 | ||