]> git.eshelyaron.com Git - emacs.git/commit
Speed up unintern, and fix symbol shorthand edge case (bug#79035)
authorMattias EngdegÄrd <mattiase@acm.org>
Sat, 19 Jul 2025 14:15:47 +0000 (16:15 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Jul 2025 08:09:40 +0000 (10:09 +0200)
commite41070c7c3627cf2d0e8cc5ddbba52c019486abb
treed16782d6d7210cb5b408fde70e287cf09962fef7
parent3c409e8c86a72629feeac1dce0d74d1048ee54f9
Speed up unintern, and fix symbol shorthand edge case (bug#79035)

Don't do a full lookup if the argument is a symbol, and only compute the
hash index once.  Fix a bug that occurred when there is another symbol
whose shorthand is equal to the true name of the symbol being removed.

* src/lread.c (Funintern): Rewrite for speed and correctness.
(oblookup_last_bucket_number, oblookup): Remove now unused variable.
* test/src/lread-tests.el (lread-unintern): New test.

(cherry picked from commit f4a9673f615aa8d1fad499784fdcd11ac0ec4042)
src/lread.c
test/src/lread-tests.el