]> git.eshelyaron.com Git - emacs.git/commit
First draught of creation of "located symbols".
authorAlan Mackenzie <acm@muc.de>
Sun, 11 Nov 2018 12:00:56 +0000 (12:00 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 11 Nov 2018 12:00:56 +0000 (12:00 +0000)
commit580e66335a52222fb95ef3564a6480357ef5326f
tree377672bd6333537fd241b1fad60fe87c7d3abd2f
parent5b218be0c362316384f5c9ef57a3bef02f742e94
First draught of creation of "located symbols".

This commit is the first on branch /scratch/accurate-warning-pos.

* src/lisp.h (Lisp_Object, vectorlike_header, pvec_type, More_Lisp_Bits): Move
to earlier on in the file to facilitate other changes.
(Lisp_Located_Symbol): New struct type.
(pvec_type): New entry PVEC_LOCATED_SYMBOL.
(lisp_h_PSEUDOVECTORP): New macro.
(lisp_h_LOCATED_SYMBOL_P, lisp_h_ONLY_SYMBOL_P, lisp_h_XONLY_SYMBOL)
(lisp_h_XLOCATED_SYMBOL): New macros.
(lisp_h_SYMBOLP, lisp_h_XSYMBOL): Macros enhanced to handle located symbols.
(ONLY_SYMBOL_P, XONLY_SYMBOL): New macros.
(LOCATED_SYMBOL_P, XLOCATED_SYMBOL, LOCATED_SYMBOL_SYM, LOCATED_SYMBOL_LOC):
New inline functions.

* src/alloc.c (build_located_symbol): New function

* src/data.c (Ftype_of): New entry for PVEC_LOCATED_SYMBOL.
(Fonly_symbol_p, Flocated_symbol_p, Flocated_symbol_sym, Flocated_symbol_loc):
New defuns.
(Vlocated_symbols_enabled): New Lisp variable.

* src/fns.c (internal_equal): Replace located-symbols by their bare symbols
for the purposes of comparison.

* src/lread.c (read0, read1, read_list, read_vector, read_internal_start): Add
a new bool argument locate_syms which means "convert symbol occurrences to
located symbols".
(read1): Add the code to perform the conversion to located symbols.
(Fread_locating_symbols): New defun.

* src/print.c (print_vectorlike): New switch arm for PVEC_LOCATED_SYMBOL.
src/alloc.c
src/data.c
src/fns.c
src/lisp.h
src/lread.c
src/print.c