emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 56804ed: Fix up invalid_syntax error signalling


From: Lars Ingebrigtsen
Subject: master 56804ed: Fix up invalid_syntax error signalling
Date: Tue, 2 Feb 2021 03:26:11 -0500 (EST)

branch: master
commit 56804edc835b5b48f3bd6f89763c13d5e3ae3124
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 src/lread.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index 5d1676b..b33a312 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]