GNU bug report logs - #77464
X is already defined as something else than a generic function

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Wed, 2 Apr 2025 16:01:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77464 <at> debbugs.gnu.org
Subject: bug#77464: X is already defined as something else than a generic function
Date: Tue, 15 Apr 2025 10:04:02 -0400
> Of course that won't fix the issue for released Emacsen, and for anyone
> who runs into this and has not seen this thread that continues to be
> very confusing.  Can you think of any workaround beside making sure that
> each and every generic function is first declared using cl-defgeneric?

Don't signal an error while loading a file?

>>> Then, after this function has returned, something else goes wrong (in
>>> this reproducer intentionally).  We can then observe that the value of
>>> (symbol-function 'demo-function) somehow goes back to being 'dummy.
>>> (I couldn't find anything else in Emacs that sets a symbol-function to
>>> 'dummy.)
> Could you please explain what was happening?  To me this still looks
> like the value somehow magically goes back to 'dummy.

I have not worked out the details of the sequence of events, to be honest.
AFAICT, the "magic" comes from the code that tries to undo partial loads
when an error is encountered in the middle of loading a file (which
involves the `function-history` symbol property and the `Vautoload_queue`).
It's quite possible that it's a result of a bug in there.


        Stefan





This bug report was last modified 61 days ago.

Previous Next


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