]> git.eshelyaron.com Git - emacs.git/commit
Bring the scratch/accurate-warning-pos up to tentative functionality.
authorAlan Mackenzie <acm@muc.de>
Sat, 17 Nov 2018 11:39:51 +0000 (11:39 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 17 Nov 2018 11:39:51 +0000 (11:39 +0000)
commita227850095be26642756e4319458b2689fb3d4c6
tree1d8543ac96eabbdae89a8b0240455ead0012e8ef
parentea69f6354d4eca812475e60e225785e79830806d
Bring the scratch/accurate-warning-pos up to tentative functionality.

To exercise it,
M-: (let ((symbols-with-pos-enabled t)) (byte-compile-file "foo.el")).

* src/.gdbinit (xsymwithpos): New function.
(xpr): Call the above for a PVEC_SYMBOL_WITH_POS.

* src/lisp.h (several macros): Put parentheses around uses of parameters.
(lisp_h_BASE_EQ, BASE_EQ): New macros with the functionality of former EQ.
(lisp_h_EQ): Modify such that a symbol with position EQ the "same" bare
symbol.
(#define EQ, #define SYMBOLP): Comment out.

* src/alloc.c (macro_XPNTR, valid_lisp_object_p, mark_char_table): Replace
SYMBOLP with BARE_SYMBOLP in places where the bit pattern, not the meaning, is
important.

* src/data.c (Vsymbols_with_pos_enabled): Amend doc string.

* src/lread.c ("read-positiong-symbols"): Correct the spelling to
"read-positionINg-symbols".

* src/print.c (print_preprocess, print_object): Use BASE_EQ rather than EQ to
avoid unwanted equivalence of a symbol with pos and its base symbol.

* lisp/emacs-lisp/bytecomp.el (byte-compile--form-stack): New variable.
(byte-compile--first-symbol, byte-compile--warning-source-offset): New
functions.
(byte-compile-warning-prefix): Amend to use also the new source position
strategy.
(byte-compile-warn): Substitute bare symbols for symbols with position before
printing them.
(byte-compile--warn-x): New function.
(compile-defun, byte-compile-from-buffer): Call read-positiong-symbols rather
than plain read when symbols-with-pos-enabled is non-nil.
(byte-compile-form): Bind byte-compile--form-stack to itself with the current
`form' pushed onto it.  This will supply position information for warning
messages.
(Many functions): Replace byte-compile-warn with byte-compile--warn-x.
lisp/emacs-lisp/bytecomp.el
src/.gdbinit
src/alloc.c
src/data.c
src/lisp.h
src/lread.c
src/print.c