[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dfae76c991: Expunge read-with-symbol-position and read-symbol-pos
From: |
Alan Mackenzie |
Subject: |
master dfae76c991: Expunge read-with-symbol-position and read-symbol-positions-list |
Date: |
Sun, 23 Jan 2022 20:09:58 -0500 (EST) |
branch: master
commit dfae76c9915454f9ef0885e1bac160a2c480e1d1
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
Expunge read-with-symbol-position and read-symbol-positions-list
These are remnants of the old way of determining byte compiler warning
positions.
* src/lread.c (read_internal_start, read1): Remove initializations amd
manipulations of these variables.
(syms_of_lread): Remove the declarations of the variables.
* lisp/emacs-list/bytecomp.el (compile-defun, byte-compile-from-buffer):
Remove bindings of the variables.
---
lisp/emacs-lisp/bytecomp.el | 7 +------
src/lread.c | 41 -----------------------------------------
2 files changed, 1 insertion(+), 47 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b4604d0735..a34ba37c04 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2215,9 +2215,7 @@ With argument ARG, insert value in current buffer after
the form."
(start-read-position (point))
(byte-compile-last-warned-form 'nothing)
(value (eval
- (let ((read-with-symbol-positions (current-buffer))
- (read-symbol-positions-list nil)
- (symbols-with-pos-enabled t))
+ (let ((symbols-with-pos-enabled t))
(displaying-byte-compile-warnings
(byte-compile-sexp
(let ((form (read-positioning-symbols
(current-buffer))))
@@ -2252,9 +2250,6 @@ With argument ARG, insert value in current buffer after
the form."
(byte-compile-depth 0)
(byte-compile-maxdepth 0)
(byte-compile-output nil)
- ;; This allows us to get the positions of symbols read.
- (read-with-symbol-positions inbuffer)
- (read-symbol-positions-list nil)
;; #### This is bound in b-c-close-variables.
;; (byte-compile-warnings byte-compile-warnings)
(symbols-with-pos-enabled t))
diff --git a/src/lread.c b/src/lread.c
index d868801f42..4ec1df672c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2537,9 +2537,6 @@ read_internal_start (Lisp_Object stream, Lisp_Object
start, Lisp_Object end,
read_objects_completed
= make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE,
DEFAULT_REHASH_THRESHOLD, Qnil, false);
- if (EQ (Vread_with_symbol_positions, Qt)
- || EQ (Vread_with_symbol_positions, stream))
- Vread_symbol_positions_list = Qnil;
if (STRINGP (stream)
|| ((CONSP (stream) && STRINGP (XCAR (stream)))))
@@ -2561,10 +2558,6 @@ read_internal_start (Lisp_Object stream, Lisp_Object
start, Lisp_Object end,
}
retval = read0 (stream, locate_syms);
- if (EQ (Vread_with_symbol_positions, Qt)
- || EQ (Vread_with_symbol_positions, stream))
- Vread_symbol_positions_list = Fnreverse (Vread_symbol_positions_list);
- /* Empty hashes can be reused; otherwise, reset on next call. */
if (HASH_TABLE_P (read_objects_map)
&& XHASH_TABLE (read_objects_map)->count > 0)
read_objects_map = Qnil;
@@ -3873,11 +3866,6 @@ read1 (Lisp_Object readcharfun, int *pch, bool
first_in_list, bool locate_syms)
result = build_symbol_with_pos (result,
make_fixnum (start_position));
- if (EQ (Vread_with_symbol_positions, Qt)
- || EQ (Vread_with_symbol_positions, readcharfun))
- Vread_symbol_positions_list
- = Fcons (Fcons (result, make_fixnum (start_position)),
- Vread_symbol_positions_list);
return unbind_to (count, result);
}
}
@@ -5166,35 +5154,6 @@ This variable is obsolete as of Emacs 28.1 and should
not be used. */);
See documentation of `read' for possible values. */);
Vstandard_input = Qt;
- DEFVAR_LISP ("read-with-symbol-positions", Vread_with_symbol_positions,
- doc: /* If non-nil, add position of read symbols to
`read-symbol-positions-list'.
-
-If this variable is a buffer, then only forms read from that buffer
-will be added to `read-symbol-positions-list'.
-If this variable is t, then all read forms will be added.
-The effect of all other values other than nil are not currently
-defined, although they may be in the future.
-
-The positions are relative to the last call to `read' or
-`read-from-string'. It is probably a bad idea to set this variable at
-the toplevel; bind it instead. */);
- Vread_with_symbol_positions = Qnil;
-
- DEFVAR_LISP ("read-symbol-positions-list", Vread_symbol_positions_list,
- doc: /* A list mapping read symbols to their positions.
-This variable is modified during calls to `read' or
-`read-from-string', but only when `read-with-symbol-positions' is
-non-nil.
-
-Each element of the list looks like (SYMBOL . CHAR-POSITION), where
-CHAR-POSITION is an integer giving the offset of that occurrence of the
-symbol from the position where `read' or `read-from-string' started.
-
-Note that a symbol will appear multiple times in this list, if it was
-read multiple times. The list is in the same order as the symbols
-were read in. */);
- Vread_symbol_positions_list = Qnil;
-
DEFVAR_LISP ("read-circle", Vread_circle,
doc: /* Non-nil means read recursive structures using #N= and
#N# syntax. */);
Vread_circle = Qt;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master dfae76c991: Expunge read-with-symbol-position and read-symbol-positions-list,
Alan Mackenzie <=