]> git.eshelyaron.com Git - emacs.git/commit
Remove SYMBOL_WITH_POS_{POS,SYM}
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 14 Feb 2024 08:16:13 +0000 (09:16 +0100)
commit6a49dabdf66198ebbc297fe0097551f2022e6108
treefdb116226a667701f835e7fb41298aba09eaaf2e
parentdedadfecf0b90d864e0df0e7774d8b35204f8352
Remove SYMBOL_WITH_POS_{POS,SYM}

* src/fns.c (internal_equal): Turn comment into eassert
that !symbols_with_pos_enabled.
(sxhash_obj): Simplify case of symbol with pos (when enabled).
* src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL_WITH_POS_POS)
(maybe_remove_pos_from_symbol): New inline functions.
(SYMBOL_WITH_POS_SYM, SYMBOL_WITH_POS_POS): Remove.
All uses replaced by the new functions.  This avoids some
double-checking in the source code, simplifies the code overall,
and avoids the need for "Type checking is done in the following
macro" comments to explain unusual code.

(cherry picked from commit 10c6aea4434b1c9ccea30a1f87f301ab2c9bade6)
src/data.c
src/fns.c
src/lisp.h
src/lread.c
src/timefns.c