diff options
| author | Chong Yidong | 2006-01-04 21:23:20 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-01-04 21:23:20 +0000 |
| commit | eaa99205567f00a0c65131a2dc96bc354ee56711 (patch) | |
| tree | fb42534d46e6d15892e4ace6964396e4d28b9543 | |
| parent | 0facd9c3c56e1ced8abf6d24206aecae9f254d47 (diff) | |
| download | emacs-eaa99205567f00a0c65131a2dc96bc354ee56711.tar.gz emacs-eaa99205567f00a0c65131a2dc96bc354ee56711.zip | |
(custom-reset-menu, Custom-mode-menu)
(custom-variable-menu, custom-face-menu, custom-group-menu):
Move back to previous ordering.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 126 |
2 files changed, 64 insertions, 67 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 18dba595537..d79e77ef066 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,6 @@ | |||
| 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-mode-menu) | 3 | * cus-edit.el (Custom-reset-current, Custom-reset-saved) |
| 4 | (custom-variable-menu, custom-face-menu, custom-group-menu): | ||
| 5 | Reorder menu items. | ||
| 6 | (Custom-reset-current, Custom-reset-saved) | ||
| 7 | (Custom-reset-standard): Fix y-or-n-p messages. | 4 | (Custom-reset-standard): Fix y-or-n-p messages. |
| 8 | (custom-link): New face for links. | 5 | (custom-link): New face for links. |
| 9 | (custom-buffer-create-internal, custom-manual): Use it. | 6 | (custom-buffer-create-internal, custom-manual): Use it. |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 98c343c4db8..5a4b499d792 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -779,7 +779,7 @@ when the action is chosen.") | |||
| 779 | (defun custom-reset (event) | 779 | (defun custom-reset (event) |
| 780 | "Select item from reset menu." | 780 | "Select item from reset menu." |
| 781 | (let* ((completion-ignore-case t) | 781 | (let* ((completion-ignore-case t) |
| 782 | (answer (widget-choose "Reset buffer" | 782 | (answer (widget-choose "Reset settings" |
| 783 | custom-reset-menu | 783 | custom-reset-menu |
| 784 | event))) | 784 | event))) |
| 785 | (if answer | 785 | (if answer |
| @@ -1471,6 +1471,30 @@ See ") | |||
| 1471 | (widget-insert " for more information.\n\n") | 1471 | (widget-insert " for more information.\n\n") |
| 1472 | (widget-insert "Operate on everything in this buffer:\n ")) | 1472 | (widget-insert "Operate on everything in this buffer:\n ")) |
| 1473 | (widget-insert " ")) | 1473 | (widget-insert " ")) |
| 1474 | (widget-create 'push-button | ||
| 1475 | :tag "Set for Current Session" | ||
| 1476 | :help-echo "\ | ||
| 1477 | Make your editing in this buffer take effect for this session." | ||
| 1478 | :action (lambda (widget &optional event) | ||
| 1479 | (Custom-set))) | ||
| 1480 | (if (not custom-buffer-verbose-help) | ||
| 1481 | (progn | ||
| 1482 | (widget-insert " ") | ||
| 1483 | (widget-create 'info-link | ||
| 1484 | :tag "Help" | ||
| 1485 | :button-face 'custom-link | ||
| 1486 | :mouse-face 'highlight | ||
| 1487 | :help-echo "Read the online help." | ||
| 1488 | "(emacs)Easy Customization"))) | ||
| 1489 | (when (or custom-file user-init-file) | ||
| 1490 | (widget-insert " ") | ||
| 1491 | (widget-create 'push-button | ||
| 1492 | :tag "Save for Future Sessions" | ||
| 1493 | :help-echo "\ | ||
| 1494 | Make your editing in this buffer take effect for future Emacs sessions. | ||
| 1495 | This updates your Emacs initialization file or creates a new one." | ||
| 1496 | :action (lambda (widget &optional event) | ||
| 1497 | (Custom-save)))) | ||
| 1474 | (if custom-reset-button-menu | 1498 | (if custom-reset-button-menu |
| 1475 | (progn | 1499 | (progn |
| 1476 | (widget-insert " ") | 1500 | (widget-insert " ") |
| @@ -1499,31 +1523,6 @@ Reset all settings in this buffer to their saved values." | |||
| 1499 | :help-echo "\ | 1523 | :help-echo "\ |
| 1500 | Un-customize all settings in this buffer and save them with standard values." | 1524 | Un-customize all settings in this buffer and save them with standard values." |
| 1501 | :action 'Custom-reset-standard))) | 1525 | :action 'Custom-reset-standard))) |
| 1502 | (widget-insert "\n ") | ||
| 1503 | (widget-create 'push-button | ||
| 1504 | :tag "Set for Current Session" | ||
| 1505 | :help-echo "\ | ||
| 1506 | Make your editing in this buffer take effect for this session." | ||
| 1507 | :action (lambda (widget &optional event) | ||
| 1508 | (Custom-set))) | ||
| 1509 | (if (not custom-buffer-verbose-help) | ||
| 1510 | (progn | ||
| 1511 | (widget-insert " ") | ||
| 1512 | (widget-create 'info-link | ||
| 1513 | :tag "Help" | ||
| 1514 | :button-face 'custom-link | ||
| 1515 | :mouse-face 'highlight | ||
| 1516 | :help-echo "Read the online help." | ||
| 1517 | "(emacs)Easy Customization"))) | ||
| 1518 | (when (or custom-file user-init-file) | ||
| 1519 | (widget-insert " ") | ||
| 1520 | (widget-create 'push-button | ||
| 1521 | :tag "Save for Future Sessions" | ||
| 1522 | :help-echo "\ | ||
| 1523 | Make your editing in this buffer take effect for future Emacs sessions. | ||
| 1524 | This updates your Emacs initialization file or creates a new one." | ||
| 1525 | :action (lambda (widget &optional event) | ||
| 1526 | (Custom-save)))) | ||
| 1527 | (widget-insert " ") | 1526 | (widget-insert " ") |
| 1528 | (widget-create 'push-button | 1527 | (widget-create 'push-button |
| 1529 | :tag "Finish" | 1528 | :tag "Finish" |
| @@ -2623,13 +2622,14 @@ Otherwise, look up symbol in `custom-guess-type-alist'." | |||
| 2623 | (get (widget-value widget) 'standard-value)) | 2622 | (get (widget-value widget) 'standard-value)) |
| 2624 | 2623 | ||
| 2625 | (defvar custom-variable-menu | 2624 | (defvar custom-variable-menu |
| 2626 | `(("Add comment" custom-comment-show custom-comment-invisible-p) | 2625 | `(("Set for current session" custom-variable-set |
| 2627 | ("Show value widget" custom-variable-edit | ||
| 2628 | (lambda (widget) | 2626 | (lambda (widget) |
| 2629 | (eq (widget-get widget :custom-form) 'lisp))) | 2627 | (eq (widget-get widget :custom-state) 'modified))) |
| 2630 | ("Show Lisp expression" custom-variable-edit-lisp | 2628 | ,@(when (or custom-file user-init-file) |
| 2631 | (lambda (widget) | 2629 | '(("Save for future sessions" custom-variable-save |
| 2632 | (eq (widget-get widget :custom-form) 'edit))) | 2630 | (lambda (widget) |
| 2631 | (memq (widget-get widget :custom-state) | ||
| 2632 | '(modified set changed rogue)))))) | ||
| 2633 | ("---" ignore ignore) | 2633 | ("---" ignore ignore) |
| 2634 | ("Reset to current value" custom-redraw | 2634 | ("Reset to current value" custom-redraw |
| 2635 | (lambda (widget) | 2635 | (lambda (widget) |
| @@ -2644,21 +2644,20 @@ Otherwise, look up symbol in `custom-guess-type-alist'." | |||
| 2644 | ("Reset to backup value" custom-variable-reset-backup | 2644 | ("Reset to backup value" custom-variable-reset-backup |
| 2645 | (lambda (widget) | 2645 | (lambda (widget) |
| 2646 | (get (widget-value widget) 'backup-value))) | 2646 | (get (widget-value widget) 'backup-value))) |
| 2647 | ("---" ignore ignore) | ||
| 2648 | ,@(when (or custom-file user-init-file) | 2647 | ,@(when (or custom-file user-init-file) |
| 2649 | '(("Erase customization" custom-variable-reset-standard | 2648 | '(("Erase customization" custom-variable-reset-standard |
| 2650 | (lambda (widget) | 2649 | (lambda (widget) |
| 2651 | (and (get (widget-value widget) 'standard-value) | 2650 | (and (get (widget-value widget) 'standard-value) |
| 2652 | (memq (widget-get widget :custom-state) | 2651 | (memq (widget-get widget :custom-state) |
| 2653 | '(modified set changed saved rogue))))))) | 2652 | '(modified set changed saved rogue))))))) |
| 2654 | ("Set for current session" custom-variable-set | 2653 | ("---" ignore ignore) |
| 2654 | ("Add comment" custom-comment-show custom-comment-invisible-p) | ||
| 2655 | ("Show value widget" custom-variable-edit | ||
| 2655 | (lambda (widget) | 2656 | (lambda (widget) |
| 2656 | (eq (widget-get widget :custom-state) 'modified))) | 2657 | (eq (widget-get widget :custom-form) 'lisp))) |
| 2657 | ,@(when (or custom-file user-init-file) | 2658 | ("Show Lisp expression" custom-variable-edit-lisp |
| 2658 | '(("Save for future sessions" custom-variable-save | 2659 | (lambda (widget) |
| 2659 | (lambda (widget) | 2660 | (eq (widget-get widget :custom-form) 'edit)))) |
| 2660 | (memq (widget-get widget :custom-state) | ||
| 2661 | '(modified set changed rogue))))))) | ||
| 2662 | "Alist of actions for the `custom-variable' widget. | 2661 | "Alist of actions for the `custom-variable' widget. |
| 2663 | Each entry has the form (NAME ACTION FILTER) where NAME is the name of | 2662 | Each entry has the form (NAME ACTION FILTER) where NAME is the name of |
| 2664 | the menu entry, ACTION is the function to call on the widget when the | 2663 | the menu entry, ACTION is the function to call on the widget when the |
| @@ -3296,16 +3295,9 @@ SPEC must be a full face spec." | |||
| 3296 | (message "Creating face editor...done")))))) | 3295 | (message "Creating face editor...done")))))) |
| 3297 | 3296 | ||
| 3298 | (defvar custom-face-menu | 3297 | (defvar custom-face-menu |
| 3299 | `(("Add comment" custom-comment-show custom-comment-invisible-p) | 3298 | `(("Set for current session" custom-face-set) |
| 3300 | ("Show all attributes" custom-face-edit-all | 3299 | ,@(when (or custom-file user-init-file) |
| 3301 | (lambda (widget) | 3300 | '(("Save for future sessions" custom-face-save-command))) |
| 3302 | (not (eq (widget-get widget :custom-form) 'all)))) | ||
| 3303 | ("Show current attributes" custom-face-edit-selected | ||
| 3304 | (lambda (widget) | ||
| 3305 | (not (eq (widget-get widget :custom-form) 'selected)))) | ||
| 3306 | ("Show Lisp expression" custom-face-edit-lisp | ||
| 3307 | (lambda (widget) | ||
| 3308 | (not (eq (widget-get widget :custom-form) 'lisp)))) | ||
| 3309 | ("---" ignore ignore) | 3301 | ("---" ignore ignore) |
| 3310 | ("Reset to saved face" custom-face-reset-saved | 3302 | ("Reset to saved face" custom-face-reset-saved |
| 3311 | (lambda (widget) | 3303 | (lambda (widget) |
| @@ -3315,9 +3307,17 @@ SPEC must be a full face spec." | |||
| 3315 | '(("Erase customization" custom-face-reset-standard | 3307 | '(("Erase customization" custom-face-reset-standard |
| 3316 | (lambda (widget) | 3308 | (lambda (widget) |
| 3317 | (get (widget-value widget) 'face-defface-spec))))) | 3309 | (get (widget-value widget) 'face-defface-spec))))) |
| 3318 | ("Set for current session" custom-face-set) | 3310 | ("---" ignore ignore) |
| 3319 | ,@(when (or custom-file user-init-file) | 3311 | ("Add comment" custom-comment-show custom-comment-invisible-p) |
| 3320 | '(("Save for future sessions" custom-face-save-command)))) | 3312 | ("Show all attributes" custom-face-edit-all |
| 3313 | (lambda (widget) | ||
| 3314 | (not (eq (widget-get widget :custom-form) 'all)))) | ||
| 3315 | ("Show current attributes" custom-face-edit-selected | ||
| 3316 | (lambda (widget) | ||
| 3317 | (not (eq (widget-get widget :custom-form) 'selected)))) | ||
| 3318 | ("Show Lisp expression" custom-face-edit-lisp | ||
| 3319 | (lambda (widget) | ||
| 3320 | (not (eq (widget-get widget :custom-form) 'lisp))))) | ||
| 3321 | "Alist of actions for the `custom-face' widget. | 3321 | "Alist of actions for the `custom-face' widget. |
| 3322 | Each entry has the form (NAME ACTION FILTER) where NAME is the name of | 3322 | Each entry has the form (NAME ACTION FILTER) where NAME is the name of |
| 3323 | the menu entry, ACTION is the function to call on the widget when the | 3323 | the menu entry, ACTION is the function to call on the widget when the |
| @@ -3893,7 +3893,15 @@ Creating group members... %2d%%" | |||
| 3893 | (insert "/\n"))))) | 3893 | (insert "/\n"))))) |
| 3894 | 3894 | ||
| 3895 | (defvar custom-group-menu | 3895 | (defvar custom-group-menu |
| 3896 | `(("Reset to current settings" custom-group-reset-current | 3896 | `(("Set for current session" custom-group-set |
| 3897 | (lambda (widget) | ||
| 3898 | (eq (widget-get widget :custom-state) 'modified))) | ||
| 3899 | ,@(when (or custom-file user-init-file) | ||
| 3900 | '(("Save for future sessions" custom-group-save | ||
| 3901 | (lambda (widget) | ||
| 3902 | (memq (widget-get widget :custom-state) '(modified set)))))) | ||
| 3903 | ("---" ignore ignore) | ||
| 3904 | ("Reset to current settings" custom-group-reset-current | ||
| 3897 | (lambda (widget) | 3905 | (lambda (widget) |
| 3898 | (memq (widget-get widget :custom-state) '(modified)))) | 3906 | (memq (widget-get widget :custom-state) '(modified)))) |
| 3899 | ("Reset to saved settings" custom-group-reset-saved | 3907 | ("Reset to saved settings" custom-group-reset-saved |
| @@ -3902,15 +3910,7 @@ Creating group members... %2d%%" | |||
| 3902 | ,@(when (or custom-file user-init-file) | 3910 | ,@(when (or custom-file user-init-file) |
| 3903 | '(("Reset to standard settings" custom-group-reset-standard | 3911 | '(("Reset to standard settings" custom-group-reset-standard |
| 3904 | (lambda (widget) | 3912 | (lambda (widget) |
| 3905 | (memq (widget-get widget :custom-state) '(modified set saved)))))) | 3913 | (memq (widget-get widget :custom-state) '(modified set saved))))))) |
| 3906 | ("---" ignore ignore) | ||
| 3907 | ("Set for current session" custom-group-set | ||
| 3908 | (lambda (widget) | ||
| 3909 | (eq (widget-get widget :custom-state) 'modified))) | ||
| 3910 | ,@(when (or custom-file user-init-file) | ||
| 3911 | '(("Save for future sessions" custom-group-save | ||
| 3912 | (lambda (widget) | ||
| 3913 | (memq (widget-get widget :custom-state) '(modified set))))))) | ||
| 3914 | "Alist of actions for the `custom-group' widget. | 3914 | "Alist of actions for the `custom-group' widget. |
| 3915 | Each entry has the form (NAME ACTION FILTER) where NAME is the name of | 3915 | Each entry has the form (NAME ACTION FILTER) where NAME is the name of |
| 3916 | the menu entry, ACTION is the function to call on the widget when the | 3916 | the menu entry, ACTION is the function to call on the widget when the |