Commit e68b7157 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

cus-edit.el (custom-command-apply): Specify the return value in the doc

string.
(Custom-reset-standard): Save custom-file (e.g. .emacs) only when
custom-command-apply has returned non-nil.
parent 55aa9668
2014-10-15 Alan Mackenzie <acm@muc.de>
* cus-edit.el (custom-command-apply): Specify the return value in
the doc string.
(Custom-reset-standard): Save custom-file (e.g. .emacs) only when
custom-command-apply has returned non-nil.
2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
 
* emacs-lisp/lisp.el (lisp--local-variables-1): Handle `quote'.
......
......@@ -779,7 +779,8 @@ when the action is chosen.")
"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."
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)))
......@@ -892,7 +893,7 @@ making them as if they had never been customized at all."
;; Bind these temporarily.
(let ((custom-reset-standard-variables-list '(t))
(custom-reset-standard-faces-list '(t)))
(custom-command-apply
(if (custom-command-apply
(lambda (widget)
(and (or (null (widget-get widget :custom-standard-value))
(widget-apply widget :custom-standard-value))
......@@ -901,7 +902,7 @@ making them as if they had never been customized at all."
(widget-apply widget :custom-mark-to-reset-standard)))
"The settings will revert to their default values, in this
and future sessions. Really erase customizations? " t)
(custom-reset-standard-save-and-update)))
(custom-reset-standard-save-and-update))))
;;; The Customize Commands
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment