GNU bug report logs -
#15814
24.3.50; Signal error on malformed bindings in `cl-symbol-macrolet' (patch)
Previous Next
Reported by: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Date: Tue, 5 Nov 2013 20:42:01 UTC
Severity: minor
Tags: patch
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> Good idea. Could you try and use macroexp--warn-and-return instead, so
>> we get a file&line location when byte-compiling?
> I'm not certain what you mean here. You seem to agree that this is an
> error, but `macroexp--warn-and-return' doesn't signal an error--it just
> prints a warning. If we do something like this:
> (let ((msg (format "Malformed `cl-symbol-macrolet' binding: %S"
> (car bindings))))
> (macroexp--warn-and-return msg `(error "%s" ,msg)))
> we'll get a warning at compile time and an error at run time. Is this
> what you have in mind? Shouldn't we signal the error as early as
> possible? Perhaps there is some Emacs convention that I'm not aware of
> in this regard.
Signaling an error stops the whole compilation, so you only get one
error at a time. Better make it a warning, even though it is indeed
a programming error.
>> BTW, the same holds for the "let" sanity checks you added to cconv
>> (which should probably be moved to macroexp, now that I think about it,
>> so we can remove them from bytecomp.el).
> I don't understand this either. By "moved to macroexp", do you just
> mean that the sanity checks should be performed using
> macroexp--warn-and-return in the manner given above?
No, I mean that they should be performed in macroexp--expand-all rather
than in cconv, so they're performed regardless of lexical-binding
(currently they're done once in cconv.el and once in bytecomp.el).
Stefan
This bug report was last modified 11 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.