(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))))
(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))
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)))))
}
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;
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);
}
}
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;