emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1fe269d59d 2/2: Fix custom-initialize-reset bootstrap error


From: Lars Ingebrigtsen
Subject: master 1fe269d59d 2/2: Fix custom-initialize-reset bootstrap error
Date: Tue, 5 Jul 2022 16:42:38 -0400 (EDT)

branch: master
commit 1fe269d59df02b398d6240385bc1861568b97868
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix custom-initialize-reset bootstrap error
    
    * lisp/custom.el (custom-initialize-reset): Fix bootstrap problem
    by avoiding when-let.
---
 lisp/custom.el | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lisp/custom.el b/lisp/custom.el
index a6e2ab351d..bbbe70c5ea 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -93,13 +93,17 @@ or (last of all) the value of EXP."
   ;; If this value has been set with `setopt' (for instance in
   ;; ~/.emacs), we didn't necessarily know the type of the user option
   ;; then.  So check now, and issue a warning if it's wrong.
-  (when-let ((value (get symbol 'custom-check-value))
-             (type (get symbol 'custom-type)))
-    (when (and (boundp symbol)
-               (eq (car value) (symbol-value symbol))
-               ;; Check that the type is correct.
-               (not (widget-apply (widget-convert type) :match (car value))))
-      (warn "Value `%S' for `%s' does not match type %s" value symbol type)))
+  (let ((value (get symbol 'custom-check-value)))
+    (when value
+      (let ((type (get symbol 'custom-type)))
+        (when (and type
+                   (boundp symbol)
+                   (eq (car value) (symbol-value symbol))
+                   ;; Check that the type is correct.
+                   (not (widget-apply (widget-convert type)
+                                      :match (car value))))
+          (warn "Value `%S' for `%s' does not match type %s"
+                value symbol type)))))
   (funcall (or (get symbol 'custom-set) #'set-default-toplevel-value)
            symbol
            (condition-case nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]