GNU bug report logs - #78637
30.1.90; Calling setopt during init loads cus-start over and over

Previous Next

Package: emacs;

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

Full log


Message #26 received at 78637 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Aaron Zeng <azeng <at> janestreet.com>
Cc: 78637 <at> debbugs.gnu.org, app-emacs-dev <at> janestreet.com
Subject: Re: bug#78637: 30.1.90; Calling setopt during init loads cus-start
 over and over
Date: Sat, 31 May 2025 12:37:54 -0400
> This dates back to
>
>     commit 4883633e7b4416a0da1a63bc7fd0c4081bdc7837
>     Author: Richard M. Stallman <rms <at> gnu.org>
>     Date:   Sat May 31 00:54:10 1997 +0000
>     
>         Arrange to load it once during dumping,
>         and again if needed by cus-edit.el.
[...]
> I have no idea why, but it's not a new problem.

The why is a bit further up in the file:

      (unless dump-mode
	;; Add it to the right group(s).
	(if (listp group)
	    (dolist (g group)
	      (custom-add-to-group g symbol 'custom-variable))
	  (custom-add-to-group group symbol 'custom-variable))
	;; Set the type.
	(put symbol 'custom-type type)
	(while rest
	  (setq prop (car rest)
		propval (cadr rest)
		rest (nthcdr 2 rest))
	  (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
		((eq prop :tag)
		 (put symbol 'custom-tag propval))))))))

IOW, the dump-time load of `cus-start.el` only sets up part of the info
(to try and keep the dumped executable a bit smaller), which is why we
need to *re*load it later.

So the remaining question is why/when it may be reloaded multiple times
rather than once.  I personally don't see this behavior here, so I think
we need a more detailed recipe to investigate the origin.


        Stefan





This bug report was last modified 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.