Re: undo-tree problem after updates
Stefan Monnier via "Emacs development discussions." <[email protected]> Sat, 25 Jul 2026 13:10:44 -0400
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
> I often install a new emacs git version. After many (all? not quite > sure) of these updates, the first start of emacs is unusable because > as soon as I try to enter ESC-x, I get this error: > > Symbol’s value as variable is void: undo-tree-mode--set-explicitly Hmm... damn... I did bump into this and I remember finding out the likely culprit, but I got side tracked, never made it into a proper bug report and can't quite remember what it was. My vague memory was that it went like this: - Start Emacs. - Emacs loads `foo.elc` (in your case, `undo-tree.elc`). - Sees there's no matching `.eln` file so launches a native compilation of `foo.eln`. - [ So far everything works fine. ] - When the (async) native compilation ends, Emacs loads `foo.eln`, tho it does so in a special way which just overwrites the `symbol-function` cells of the toplevel functions defined in `foo.el(c|n)`. - And now your Emacs is in this funny state where it will complain about `foo--set-explicitly`. Exit Emacs, restart it, and the problem is gone. Exit Emacs, delete the `foo.eln` file, restart Emacs, the problem is gone at first but reappears as soon as the `foo.eln` is recreated and (re)loaded. I think this has to do with the fact to `foo.elc` was compiled with an Emacs using an other version of the `define-globalized-minor-mode` macro than the one used when building `foo.eln`. [ IOW it's another corner case problem due to compiling starting from `foo.el` instead of starting from `foo.elc`. 🙂 ] === Stefan