From 4982fd95c7d1e099f50d875ca58e92d0c24bb0df Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 23 Aug 2019 02:24:55 +0200 Subject: [PATCH] Signal `invalid-read-syntax' for "trailing garbage" * 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/minibuf.c b/src/minibuf.c index 14a0dbe762c..f6cf47f1f28 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -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")); } } -- 2.39.2