aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorVibhav Pant2020-08-21 14:04:35 +0530
committerVibhav Pant2020-08-21 14:04:35 +0530
commitf0f8d7b82492e741950c363a03b886965c91b1b0 (patch)
tree19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/cus-edit.el
parent9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff)
parentc818c29771d3cb51875643b2f6c894073e429dd2 (diff)
downloademacs-feature/native-comp-macos-fixes.tar.gz
emacs-feature/native-comp-macos-fixes.zip
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 16695967dfa..23ceb3a857a 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -801,16 +801,19 @@ has been executed, nil otherwise."
801If a setting was edited and set before, this saves it. If a 801If a setting was edited and set before, this saves it. If a
802setting was merely edited before, this sets it then saves it." 802setting was merely edited before, this sets it then saves it."
803 (interactive) 803 (interactive)
804 (when (custom-command-apply 804 (let (edited-widgets)
805 (lambda (child) 805 (when (custom-command-apply
806 (when (memq (widget-get child :custom-state) 806 (lambda (child)
807 '(modified set changed rogue)) 807 (when (memq (widget-get child :custom-state)
808 (widget-apply child :custom-mark-to-save))) 808 '(modified set changed rogue))
809 "Save all settings in this buffer? " t) 809 (push child edited-widgets)
810 ;; Save changes to buffer and redraw. 810 (widget-apply child :custom-mark-to-save)))
811 (custom-save-all) 811 "Save all settings in this buffer? " t)
812 (dolist (child custom-options) 812 ;; Save changes to buffer.
813 (widget-apply child :custom-state-set-and-redraw)))) 813 (custom-save-all)
814 ;; Redraw and recalculate the state when necessary.
815 (dolist (widget edited-widgets)
816 (widget-apply widget :custom-state-set-and-redraw)))))
814 817
815(defun custom-reset (_widget &optional event) 818(defun custom-reset (_widget &optional event)
816 "Select item from reset menu." 819 "Select item from reset menu."
@@ -4868,8 +4871,6 @@ If several parents are listed, go to the first of them."
4868 (parent (downcase (widget-get button :tag)))) 4871 (parent (downcase (widget-get button :tag))))
4869 (customize-group parent))))) 4872 (customize-group parent)))))
4870 4873
4871(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1")
4872
4873(defcustom Custom-mode-hook nil 4874(defcustom Custom-mode-hook nil
4874 "Hook called when entering Custom mode." 4875 "Hook called when entering Custom mode."
4875 :type 'hook 4876 :type 'hook
@@ -4940,8 +4941,6 @@ if that value is non-nil."
4940 4941
4941(put 'Custom-mode 'mode-class 'special) 4942(put 'Custom-mode 'mode-class 'special)
4942 4943
4943(define-obsolete-function-alias 'custom-mode 'Custom-mode "23.1")
4944
4945;;; The End. 4944;;; The End.
4946 4945
4947(provide 'cus-edit) 4946(provide 'cus-edit)