Subject: Re: bug#76748: 31.0.50; `unload-feature' unbinds NEW-ALIAS and BASE-VARIABLE of variable alias

From: Jens Schmidt <[email-masked]>
Date: Sat, 15 Mar 2025 17:57:25 +0100

Thanks for your review.  I'll implement your recommendations (and
Eli's), but here is one more general question, which came to me
only now:  What's the general purpose of `unload-history'?

If I understand the Elisp manual ((elisp) Unloading) correctly, the
main intention of unloading a library is to reclaim memory:

  You can discard the functions and variables loaded by a library
  to reclaim memory for other Lisp objects.

Plus `unload-history' currently does not really try to be overly
thorough in its cleanup: Docstrings of variables survive the
cleanup, for example, and so do faces.

So another, less invasive option to fix this bug might be to just
skip variable aliases in `unload-history' and not call `makunbound'
on them.

WDYT?