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
Message #17 received at 15814 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> (let ((msg (format "Malformed `cl-symbol-macrolet' binding: %S"
>> (car bindings))))
>> (macroexp--warn-and-return msg `(error "%s" ,msg)))
>
> 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.
And then signal the error at run time? Do I understand you correctly
about that?
What if we're not compiling? If you don't want the error to abort the
build process, it seems that the ideal solution would be, in the compiled
case, to print a warning during compilation and signal an error at run
time; and in the interpreted case, to signal the error at macro
expansion time.
> 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).
This wouldn't work since there's no guarantee that any particular form
passes through macroexp--expand-all, not in the interpreter at least.
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.