about summary refs log tree commit diff stats
path: root/lisp/+cus-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/+cus-edit.el')
-rw-r--r--lisp/+cus-edit.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/+cus-edit.el b/lisp/+cus-edit.el index 6ab8527..7fa46d4 100644 --- a/lisp/+cus-edit.el +++ b/lisp/+cus-edit.el
@@ -34,15 +34,19 @@
34 "Variables to allow changing while loading the Custom file.") 34 "Variables to allow changing while loading the Custom file.")
35 35
36(defun +custom-load-ignoring-most-customizations (&optional 36(defun +custom-load-ignoring-most-customizations (&optional
37 noerror 37 error
38 nomessage 38 nomessage
39 nosuffix 39 nosuffix
40 must-suffix) 40 must-suffix)
41 "Load `custom-file', ignoring most customizations. 41 "Load `custom-file', ignoring most customizations.
42Ignore all faces, and only load variables in 42Ignore all faces, and only load variables in
43`+customize-variable-allowlist'. All the optional 43`+customize-variable-allowlist'. All the optional
44variables---NOERROR, NOMESSAGE, NOSUFFIX, MUST-SUFFIX---are 44variables---ERROR, NOMESSAGE, NOSUFFIX, MUST-SUFFIX---are
45passed on to `load'." 45passed on to `load'.
46
47NOTE: ERROR is the opposite of its value in `load' -- meaning
48that this function by default does /not/ error, but will if you
49pass t to it."
46 (cl-letf (((symbol-function 'custom-set-faces) 'ignore) 50 (cl-letf (((symbol-function 'custom-set-faces) 'ignore)
47 ((symbol-function 'custom-set-variables) 51 ((symbol-function 'custom-set-variables)
48 (lambda (&rest args) 52 (lambda (&rest args)
@@ -51,7 +55,7 @@ passed on to `load'."
51 (memq (car el) 55 (memq (car el)
52 +custom-variable-allowlist)) 56 +custom-variable-allowlist))
53 args))))) 57 args)))))
54 (load custom-file noerror nomessage nosuffix must-suffix))) 58 (load custom-file (not error) nomessage nosuffix must-suffix)))
55 59
56(defun +cus-edit-expand-widgets (&rest _) 60(defun +cus-edit-expand-widgets (&rest _)
57 "Expand descriptions in `Custom-mode' buffers." 61 "Expand descriptions in `Custom-mode' buffers."