Subject: bug#24649: 24.5; Why no standard error for "Trailing garbage following expression"?

From: Eli Zaretskii <[email-masked]>
Date: Fri, 23 Aug 2019 11:06:50 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Fri, 23 Aug 2019 02:25:37 +0200
> Cc: [email-masked]
> 
> >> Shouldn't this error be a standard error?  If not a new standard error,
> >> shouldn't it at least use one of the existing standard errors, such as
> >> `scan-error' or `invalid-read-syntax'?
> >>
> >> Otherwise, how to easily handle this error (e.g., to tell the user to
> >> correct the input being read and then read again)?
> >
> > Makes sense to me.  I'm not sure what signal to use, though -- anybody
> > got an idea?
> 
> [...]
> 
> > +	    xsignal1 (Qinvalid_read_syntax,
> > +		      build_string ("Trailing garbage following expression"));
> 
> There weren't any comments, so I've now applied this.  If somebody has a
> better idea for the error signal, please amend.

Thanks, but this change needs to be reflected in the ELisp manual,
where currently invalid-read-syntax is documented for a different use
case.