# HG changeset patch # User Chong Yidong # Date 1136409800 0 # Node ID b0c2a07f73f65dd48cccbe342e5e8e15aeb4eb21 # Parent 606e8e24acfe804247e0aec143bad2a56d872dc5 (custom-reset-menu, Custom-mode-menu) (custom-variable-menu, custom-face-menu, custom-group-menu): Move back to previous ordering. diff -r 606e8e24acfe -r b0c2a07f73f6 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jan 04 21:13:49 2006 +0000 +++ b/lisp/ChangeLog Wed Jan 04 21:23:20 2006 +0000 @@ -1,9 +1,6 @@ 2006-01-04 Chong Yidong - * cus-edit.el (custom-reset-menu, Custom-mode-menu) - (custom-variable-menu, custom-face-menu, custom-group-menu): - Reorder menu items. - (Custom-reset-current, Custom-reset-saved) + * cus-edit.el (Custom-reset-current, Custom-reset-saved) (Custom-reset-standard): Fix y-or-n-p messages. (custom-link): New face for links. (custom-buffer-create-internal, custom-manual): Use it. diff -r 606e8e24acfe -r b0c2a07f73f6 lisp/cus-edit.el --- a/lisp/cus-edit.el Wed Jan 04 21:13:49 2006 +0000 +++ b/lisp/cus-edit.el Wed Jan 04 21:23:20 2006 +0000 @@ -779,7 +779,7 @@ (defun custom-reset (event) "Select item from reset menu." (let* ((completion-ignore-case t) - (answer (widget-choose "Reset buffer" + (answer (widget-choose "Reset settings" custom-reset-menu event))) (if answer @@ -1471,6 +1471,30 @@ (widget-insert " for more information.\n\n") (widget-insert "Operate on everything in this buffer:\n ")) (widget-insert " ")) + (widget-create 'push-button + :tag "Set for Current Session" + :help-echo "\ +Make your editing in this buffer take effect for this session." + :action (lambda (widget &optional event) + (Custom-set))) + (if (not custom-buffer-verbose-help) + (progn + (widget-insert " ") + (widget-create 'info-link + :tag "Help" + :button-face 'custom-link + :mouse-face 'highlight + :help-echo "Read the online help." + "(emacs)Easy Customization"))) + (when (or custom-file user-init-file) + (widget-insert " ") + (widget-create 'push-button + :tag "Save for Future Sessions" + :help-echo "\ +Make your editing in this buffer take effect for future Emacs sessions. +This updates your Emacs initialization file or creates a new one." + :action (lambda (widget &optional event) + (Custom-save)))) (if custom-reset-button-menu (progn (widget-insert " ") @@ -1499,31 +1523,6 @@ :help-echo "\ Un-customize all settings in this buffer and save them with standard values." :action 'Custom-reset-standard))) - (widget-insert "\n ") - (widget-create 'push-button - :tag "Set for Current Session" - :help-echo "\ -Make your editing in this buffer take effect for this session." - :action (lambda (widget &optional event) - (Custom-set))) - (if (not custom-buffer-verbose-help) - (progn - (widget-insert " ") - (widget-create 'info-link - :tag "Help" - :button-face 'custom-link - :mouse-face 'highlight - :help-echo "Read the online help." - "(emacs)Easy Customization"))) - (when (or custom-file user-init-file) - (widget-insert " ") - (widget-create 'push-button - :tag "Save for Future Sessions" - :help-echo "\ -Make your editing in this buffer take effect for future Emacs sessions. -This updates your Emacs initialization file or creates a new one." - :action (lambda (widget &optional event) - (Custom-save)))) (widget-insert " ") (widget-create 'push-button :tag "Finish" @@ -2623,13 +2622,14 @@ (get (widget-value widget) 'standard-value)) (defvar custom-variable-menu - `(("Add comment" custom-comment-show custom-comment-invisible-p) - ("Show value widget" custom-variable-edit + `(("Set for current session" custom-variable-set (lambda (widget) - (eq (widget-get widget :custom-form) 'lisp))) - ("Show Lisp expression" custom-variable-edit-lisp - (lambda (widget) - (eq (widget-get widget :custom-form) 'edit))) + (eq (widget-get widget :custom-state) 'modified))) + ,@(when (or custom-file user-init-file) + '(("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 (lambda (widget) @@ -2644,21 +2644,20 @@ ("Reset to backup value" custom-variable-reset-backup (lambda (widget) (get (widget-value widget) 'backup-value))) - ("---" ignore ignore) ,@(when (or custom-file user-init-file) '(("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 for current session" custom-variable-set + ("---" ignore ignore) + ("Add comment" custom-comment-show custom-comment-invisible-p) + ("Show value widget" custom-variable-edit (lambda (widget) - (eq (widget-get widget :custom-state) 'modified))) - ,@(when (or custom-file user-init-file) - '(("Save for future sessions" custom-variable-save - (lambda (widget) - (memq (widget-get widget :custom-state) - '(modified set changed rogue))))))) + (eq (widget-get widget :custom-form) 'lisp))) + ("Show Lisp expression" custom-variable-edit-lisp + (lambda (widget) + (eq (widget-get widget :custom-form) 'edit)))) "Alist of actions for the `custom-variable' widget. Each entry has the form (NAME ACTION FILTER) where NAME is the name of the menu entry, ACTION is the function to call on the widget when the @@ -3296,16 +3295,9 @@ (message "Creating face editor...done")))))) (defvar custom-face-menu - `(("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 - (lambda (widget) - (not (eq (widget-get widget :custom-form) 'selected)))) - ("Show Lisp expression" custom-face-edit-lisp - (lambda (widget) - (not (eq (widget-get widget :custom-form) 'lisp)))) + `(("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 (lambda (widget) @@ -3315,9 +3307,17 @@ '(("Erase customization" custom-face-reset-standard (lambda (widget) (get (widget-value widget) 'face-defface-spec))))) - ("Set for current session" custom-face-set) - ,@(when (or custom-file user-init-file) - '(("Save for future sessions" custom-face-save-command)))) + ("---" 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 + (lambda (widget) + (not (eq (widget-get widget :custom-form) 'selected)))) + ("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. Each entry has the form (NAME ACTION FILTER) where NAME is the name of the menu entry, ACTION is the function to call on the widget when the @@ -3893,7 +3893,15 @@ (insert "/\n"))))) (defvar custom-group-menu - `(("Reset to current settings" custom-group-reset-current + `(("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 + (lambda (widget) + (memq (widget-get widget :custom-state) '(modified set)))))) + ("---" ignore ignore) + ("Reset to current settings" custom-group-reset-current (lambda (widget) (memq (widget-get widget :custom-state) '(modified)))) ("Reset to saved settings" custom-group-reset-saved @@ -3902,15 +3910,7 @@ ,@(when (or custom-file user-init-file) '(("Reset to standard settings" custom-group-reset-standard (lambda (widget) - (memq (widget-get widget :custom-state) '(modified set saved)))))) - ("---" ignore ignore) - ("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 - (lambda (widget) - (memq (widget-get widget :custom-state) '(modified set))))))) + (memq (widget-get widget :custom-state) '(modified set saved))))))) "Alist of actions for the `custom-group' widget. Each entry has the form (NAME ACTION FILTER) where NAME is the name of the menu entry, ACTION is the function to call on the widget when the