Fix up invalid_syntax error signalling
* src/lread.c (invalid_syntax_lisp): Instead of putting the line/column in a string, signal an error containing the numbers as data. This allows for easier post-processing and is how other similar errors (like (forward-sexp 1)) do it.
This commit is contained in:
parent
83efac6477
commit
56804edc83
1 changed files with 7 additions and 8 deletions
15
src/lread.c
15
src/lread.c
|
@ -545,14 +545,13 @@ invalid_syntax_lisp (Lisp_Object s, Lisp_Object readcharfun)
|
|||
{
|
||||
if (BUFFERP (readcharfun))
|
||||
{
|
||||
xsignal1 (Qinvalid_read_syntax,
|
||||
CALLN (Fformat, build_string ("%s (line %d, column %d)"),
|
||||
s,
|
||||
/* We should already be in the readcharfun
|
||||
buffer when this error is called, so no need
|
||||
to switch to it first. */
|
||||
make_fixnum (count_lines (BEGV_BYTE, PT_BYTE) + 1),
|
||||
make_fixnum (current_column ())));
|
||||
xsignal (Qinvalid_read_syntax,
|
||||
list3 (s,
|
||||
/* We should already be in the readcharfun
|
||||
buffer when this error is called, so no need
|
||||
to switch to it first. */
|
||||
make_fixnum (count_lines (BEGV_BYTE, PT_BYTE) + 1),
|
||||
make_fixnum (current_column ())));
|
||||
}
|
||||
else
|
||||
xsignal1 (Qinvalid_read_syntax, s);
|
||||
|
|
Loading…
Add table
Reference in a new issue