* bug#48492: [PATCH] Fix wrong-type-argument error while loading pdump file
@ 2021-05-17 12:31 Gong Qijian
2021-05-18 14:37 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Gong Qijian @ 2021-05-17 12:31 UTC (permalink / raw)
To: 48492; +Cc: Gong Qijian
* lisp/startup.el(command-line): Don't reverse the
`custom-delayed-init-variables` if it's a non-list.
This issue was introduced by commit 2fb271ca "Fix unload+reload of
files using `custom-initialize-delay` (bug#47072)" which changed the
initial value of `custom-delayed-init-variables` from nil to t.
Steps to reproduce:
⋊> ./src/emacs --batch --eval '(dump-emacs-portable "dump")' && \
./src/emacs --dump-file=dump -nw -Q --batch
Debugger entered--Lisp error: (wrong-type-argument arrayp t)
command-line()
normal-top-level()
---
lisp/startup.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/startup.el b/lisp/startup.el
index bb25c1b7..0df4fe02 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1197,12 +1197,13 @@ command-line
;; Re-evaluate predefined variables whose initial value depends on
;; the runtime context.
- (setq custom-delayed-init-variables
- ;; Initialize them in the same order they were loaded, in case there
- ;; are dependencies between them.
- (nreverse custom-delayed-init-variables))
- (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
- (setq custom-delayed-init-variables t)
+ (when (listp custom-delayed-init-variables)
+ (setq custom-delayed-init-variables
+ ;; Initialize them in the same order they were loaded, in case there
+ ;; are dependencies between them.
+ (nreverse custom-delayed-init-variables))
+ (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
+ (setq custom-delayed-init-variables t))
;; Warn for invalid user name.
(when init-file-user
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#48492: [PATCH] Fix wrong-type-argument error while loading pdump file
2021-05-17 12:31 bug#48492: [PATCH] Fix wrong-type-argument error while loading pdump file Gong Qijian
@ 2021-05-18 14:37 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-18 14:37 UTC (permalink / raw)
To: Gong Qijian; +Cc: 48492
Gong Qijian <gongqijian@gmail.com> writes:
> This issue was introduced by commit 2fb271ca "Fix unload+reload of
> files using `custom-initialize-delay` (bug#47072)" which changed the
> initial value of `custom-delayed-init-variables` from nil to t.
[...]
> - (setq custom-delayed-init-variables
> - ;; Initialize them in the same order they were loaded, in case there
> - ;; are dependencies between them.
> - (nreverse custom-delayed-init-variables))
> - (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
> - (setq custom-delayed-init-variables t)
> + (when (listp custom-delayed-init-variables)
> + (setq custom-delayed-init-variables
> + ;; Initialize them in the same order they were loaded, in case there
> + ;; are dependencies between them.
> + (nreverse custom-delayed-init-variables))
> + (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
> + (setq custom-delayed-init-variables t))
Thanks -- I've applied this with a change: The pre-patched version would
set `custom-delayed-init-variables' to t always, but with this patch,
it's only set if `custom-delayed-init-variables' is a proper list. So I
moved the last setq out of the `when'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-18 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 12:31 bug#48492: [PATCH] Fix wrong-type-argument error while loading pdump file Gong Qijian
2021-05-18 14:37 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).