From: Lars Ingebrigtsen Date: Tue, 2 Feb 2021 08:26:02 +0000 (+0100) Subject: Fix up invalid_syntax error signalling X-Git-Tag: emacs-28.0.90~3976 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=56804edc835b5b48f3bd6f89763c13d5e3ae3124;p=emacs.git 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. --- diff --git a/src/lread.c b/src/lread.c index 5d1676b0c9c..b33a312299f 100644 --- a/src/lread.c +++ b/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);