From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gong Qijian Newsgroups: gmane.emacs.bugs Subject: bug#48492: [PATCH] Fix wrong-type-argument error while loading pdump file Date: Mon, 17 May 2021 20:31:58 +0800 Message-ID: <20210517123158.81940-1-gongqijian@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3202"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gong Qijian To: 48492@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 03:51:49 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1liotg-0000i9-Nr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 03:51:48 +0200 Original-Received: from localhost ([::1]:45802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liotf-0000DN-Nt for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 May 2021 21:51:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liomD-0000Au-PF for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:44:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1liomD-0003eI-6x for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:44:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1liomD-00020I-5Y for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:44:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gong Qijian Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 May 2021 01:44:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48492 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16213022247638 (code B ref -1); Tue, 18 May 2021 01:44:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2021 01:43:44 +0000 Original-Received: from localhost ([127.0.0.1]:54126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1liolq-0001z7-Gx for submit@debbugs.gnu.org; Mon, 17 May 2021 21:43:44 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lioDr-0001Ao-Ug for submit@debbugs.gnu.org; Mon, 17 May 2021 21:08:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lioDr-0007BD-Pj for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:08:35 -0400 Original-Received: from [39.160.160.82] (port=1356 helo=mbp33.lan) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lioDp-0007EH-Uz for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:08:35 -0400 Original-Received: by mbp33.lan (Postfix, from userid 501) id 257873F0DFB1; Mon, 17 May 2021 20:32:14 +0800 (CST) X-Mailer: git-send-email 2.25.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 39.160.160.82 (deferred) Received-SPF: none client-ip=39.160.160.82; envelope-from=gqj@mbp33.lan; helo=mbp33.lan X-Spam_score_int: 84 X-Spam_score: 8.4 X-Spam_bar: ++++++++ X-Spam_report: (8.4 / 5.0 requ) BAYES_05=-0.5, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, NO_DNS_FOR_FROM=0.001, RCVD_IN_PBL=3.335, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, SPOOFED_FREEMAIL=1.5, SPOOFED_FREEMAIL_NO_RDNS=0.001, SPOOF_GMAIL_MID=0.82 autolearn=no autolearn_force=no X-Spam_action: reject X-Mailman-Approved-At: Mon, 17 May 2021 21:43:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206756 Archived-At: * 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