Function: custom-command-apply
custom-command-apply is a byte-compiled function defined in
cus-edit.el.gz.
Signature
(custom-command-apply FUN QUERY &optional STRONG-QUERY)
Documentation
Call function FUN on all widgets in custom-options.
If there is more than one widget, ask user for confirmation using
the query string QUERY, using y-or-n-p if STRONG-QUERY is nil,
and yes-or-no-p otherwise. Return non-nil if the functionality
has been executed, nil otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-command-apply (fun query &optional strong-query)
"Call function FUN on all widgets in `custom-options'.
If there is more than one widget, ask user for confirmation using
the query string QUERY, using `y-or-n-p' if STRONG-QUERY is nil,
and `yes-or-no-p' otherwise. Return non-nil if the functionality
has been executed, nil otherwise."
(if (or (and (= 1 (length custom-options))
(memq (widget-type (car custom-options))
'(custom-variable custom-face)))
(funcall (if strong-query 'yes-or-no-p 'y-or-n-p) query))
(progn (mapc fun custom-options) t)
(message "Aborted")
nil))