]> git.eshelyaron.com Git - emacs.git/commitdiff
Signal `invalid-read-syntax' for "trailing garbage"
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 00:24:55 +0000 (02:24 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 00:24:55 +0000 (02:24 +0200)
* src/minibuf.c (string_to_object): Signal `invalid-read-syntax'
instead of the generic `error' for "trailing garbage following
expression" (bug#24649).

src/minibuf.c

index 14a0dbe762cd8d26b67e28ad2753cd0b158d4cff..f6cf47f1f287ad626fec5cf1130190f750d23867 100644 (file)
@@ -169,7 +169,8 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
        {
          int c = SREF (val, i);
          if (c != ' ' && c != '\t' && c != '\n')
-           error ("Trailing garbage following expression");
+           xsignal1 (Qinvalid_read_syntax,
+                     build_string ("Trailing garbage following expression"));
        }
     }