[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15814: 24.3.50; Signal error on malformed bindings in `cl-symbol-mac

From: Nathan Trapuzzano
Subject: bug#15814: 24.3.50; Signal error on malformed bindings in `cl-symbol-macrolet' (patch)
Date: Wed, 06 Nov 2013 06:16:55 -0500
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]