GNU bug report logs -
#78637
30.1.90; Calling setopt during init loads cus-start over and over
Previous Next
Reported by: Aaron Zeng <azeng <at> janestreet.com>
Date: Thu, 29 May 2025 20:58:02 UTC
Severity: normal
Found in version 30.1.90
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> IIUC on Android, the first time the users run their Emacs, you run
>> a special session started from `temacs` with `dump-mode=nil` but where
>> you do perform a dump at the end of `loadup` and then continue on to
>> a normal GUI startup?
>>
>> In that case, I'd expect that this first GUI session works correctly
>> (w.r.t `custom-reevaluate-setting`), but indeed the subsequent runs
>> (which presumably make use of the generated pdmp file) will fail to
>> reevaluate the settings.
>>
>> Is that what you saw?
>
> I believe so, yes, though there is no `temacs' binary, just a shared
> object that is loaded into `/system/bin/app_process' and which is used
> to load dumped and undumped sessions alike.
Then I suggest the patch below.
Stefan
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 5057ab93161..79c23d9328b 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -949,7 +949,7 @@ minibuffer-prompt-properties--setter
;; If this is NOT while dumping Emacs, set up the rest of the
;; customization info. This is the stuff that is not needed
;; until someone does M-x customize etc.
- (if (or dump-mode (and (featurep 'android) (not after-init-time)))
+ (if (bound-and-true-p cus-start--preload)
;; Don't re-add to custom-delayed-init-variables post-startup.
;; Note this is the _only_ initialize property we handle.
(if (eq (cadr (memq :initialize rest)) #'custom-initialize-delay)
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 6748c0a0750..c6cfc5690e2 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -392,7 +392,8 @@
(compiled-function-p (symbol-function 'macroexpand-all)))
(setq internal-make-interpreted-closure-function
#'cconv-make-interpreted-closure))
-(load "cus-start") ;Late to reduce customize-rogue (needs loaddefs.el anyway)
+(dlet ((cus-start--preload t))
+ (load "cus-start")) ;Late to reduce customize-rogue (needs loaddefs.el anyway)
(load "tooltip")
(load "international/iso-transl") ; Binds Alt-[ and friends.
This bug report was last modified 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.