From: Lars Ingebrigtsen Date: Tue, 5 Jul 2022 20:42:25 +0000 (+0200) Subject: Fix custom-initialize-reset bootstrap error X-Git-Tag: emacs-29.0.90~1447^2~1158 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1fe269d59df02b398d6240385bc1861568b97868;p=emacs.git Fix custom-initialize-reset bootstrap error * lisp/custom.el (custom-initialize-reset): Fix bootstrap problem by avoiding when-let. --- diff --git a/lisp/custom.el b/lisp/custom.el index a6e2ab351d4..bbbe70c5ea8 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