(defun Custom-set (&rest _ignore)
"Set the current value of all edited settings in the buffer."
- (interactive)
+ (interactive "" Custom-mode)
(custom-command-apply
(lambda (child)
(when (eq (widget-get child :custom-state) 'modified)
"Set all edited settings, then save all settings that have been set.
If a setting was edited and set before, this saves it. If a
setting was merely edited before, this sets it then saves it."
- (interactive)
+ (interactive "" Custom-mode)
(let (edited-widgets)
(when (custom-command-apply
(lambda (child)
(defun Custom-reset-current (&rest _ignore)
"Reset all edited settings in the buffer to show their current values."
- (interactive)
+ (interactive "" Custom-mode)
(custom-command-apply
(lambda (widget)
(if (memq (widget-get widget :custom-state) '(modified changed))
(defun Custom-reset-saved (&rest _ignore)
"Reset all edited or set settings in the buffer to their saved value.
This also shows the saved values in the buffer."
- (interactive)
+ (interactive "" Custom-mode)
(custom-command-apply
(lambda (widget)
(if (memq (widget-get widget :custom-state) '(modified set changed rogue))
The immediate result is to restore them to their standard values.
This operation eliminates any saved values for the group members,
making them as if they had never been customized at all."
- (interactive)
+ (interactive "" Custom-mode)
;; Bind these temporarily.
(let ((custom-reset-standard-variables-list '(t))
(custom-reset-standard-faces-list '(t)))
t nil nil (if group (symbol-name major-mode))))))))
(customize-group (custom-group-of-mode mode)))
+(put 'customize-mode 'minibuffer-action
+ (cons (lambda (m) (save-selected-window (customize-mode (intern m))))
+ "customize"))
+
(defun customize-read-group ()
(let* ((sym (symbol-at-point))
(def (or (and sym
(t
(pop-to-buffer-same-window name)))))
+(put 'customize-group 'minibuffer-action
+ (cons (lambda (g) (save-selected-window (customize-group g)))
+ "customize"))
+
;;;###autoload
(defun customize-group-other-window (&optional group)
"Customize GROUP, which must be a customization group, in another window."
(interactive (list (customize-read-group)))
(customize-group group t))
+(put 'customize-group 'minibuffer-action 'customize-group)
+
;;;###autoload
(defalias 'customize-variable 'customize-option)
(unless (eq symbol basevar)
(message "`%s' is an alias for `%s'" symbol basevar))))
+(put 'customize-option 'minibuffer-action
+ (cons (lambda (v) (save-selected-window (customize-option (intern v))))
+ "customize"))
+
(defface custom-boolean-option-on
'((t :inherit success))
"Face for the \"ON\" indicator of boolean user option.")
(unless (eq symbol basevar)
(message "`%s' is an alias for `%s'" symbol basevar))))
+(put 'customize-option-other-window 'minibuffer-action 'customize-option)
+
(defvar customize-changed-options-previous-release "30.1"
"Version for `customize-changed' to refer back to by default.")
With argument SINCE-VERSION (a string), customize all settings
that were added or redefined since that version."
-
(interactive
(list
(read-from-minibuffer
(format "*Customize Face: %s*"
(custom-unlispify-tag-name face))))))
+(put 'customize-face 'minibuffer-action
+ (cons (lambda (f) (save-selected-window (customize-face (intern f))))
+ "customize"))
+
;;;###autoload
(defun customize-face-other-window (&optional face)
"Show customization buffer for face FACE in other window.
(or (face-at-point t t) "all faces") t)))
(customize-face face t))
+(put 'customize-face-other-window 'minibuffer-action 'customize-face)
+
(defun custom-unsaved-options ()
"List of options and faces set in this session but not saved.
Each entry is of the form (SYMBOL TYPE), where TYPE is one of the
(custom-sort-items found t custom-buffer-order-groups))
"*Customize Apropos*")))
+(put 'customize-apropos 'minibuffer-action
+ (cons (lambda (p) (save-selected-window (customize-apropos p)))
+ "customize-apropos"))
+
;;;###autoload
(defun customize-apropos-options (regexp &optional _ignored)
"Customize all loaded customizable options matching REGEXP."
(interactive (list (apropos-read-pattern "options")))
(customize-apropos regexp 'options))
+(put 'customize-apropos-options 'minibuffer-action 'customize-apropos)
+
;;;###autoload
(defun customize-apropos-faces (regexp)
"Customize all loaded faces matching REGEXP."
(interactive (list (apropos-read-pattern "faces")))
(customize-apropos regexp 'faces))
+(put 'customize-apropos-faces 'minibuffer-action 'customize-apropos)
+
;;;###autoload
(defun customize-apropos-groups (regexp)
"Customize all loaded groups matching REGEXP."
(interactive (list (apropos-read-pattern "groups")))
(customize-apropos regexp 'groups))
+(put 'customize-apropos-groups 'minibuffer-action 'customize-apropos)
+
;;;###autoload
(defun custom-prompt-customize-unsaved-options ()
"Prompt user to customize any unsaved customization options.
(defun Custom-buffer-done (&rest _ignore)
"Exit current Custom buffer according to `custom-buffer-done-kill'."
- (interactive)
+ (interactive "" Custom-mode)
(quit-window custom-buffer-done-kill))
(defvar custom-button nil
menus to change them are visible; and the concise view, where only the
minimal details are shown, usually the name, the doc string and little
else."
- (interactive)
+ (interactive "" Custom-mode)
(save-excursion
(goto-char (point-min))
;; Surely there's a better way to find all the "top level" widgets
(defun Custom-no-edit (_pos &optional _event)
"Invoke button at POS, or refuse to allow editing of Custom buffer."
- (interactive "@d")
+ (interactive "" Custom-mode)
(error "You can't edit this part of the Custom buffer"))
(defun Custom-newline (pos &optional event)
To see what function the widget will call, use the
`widget-describe' command."
- (interactive "@d")
+ (interactive "" Custom-mode)
(let ((button (get-char-property pos 'button)))
;; If there is no button at point, then use the one at the start
;; of the line, if it is a custom-group-link (bug#2298).
(defun Custom-goto-parent ()
"Go to the parent group listed at the top of this buffer.
If several parents are listed, go to the first of them."
- (interactive)
+ (interactive "" Custom-mode)
(save-excursion
(goto-char (point-min))
(if (search-forward "\nParent groups: " nil t)
(format "*Customize Icon: %s*"
(custom-unlispify-tag-name icon))))
+(put 'customize-icon 'minibuffer-action
+ (cons (lambda (i) (save-selected-window (customize-icon (intern i))))
+ "customize"))
+
(defun custom-icon-state-set (widget &optional state)
"Set the state of WIDGET to STATE."
(let ((value (custom--icons-widget-value