[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: Stefan Monnier
Subject: bug#15814: 24.3.50; Signal error on malformed bindings in `cl-symbol-macrolet' (patch)
Date: Wed, 06 Nov 2013 08:45:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>>> (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?

Check other uses of macroexp--warn-and-return (there aren't many).
It doesn't signal any error at all.  But they do emit warnings either
during compilation or while loading an interpreted file.

>> 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.

As I said, currently it's performed in bytecomp.el and cconv.el, and
there's no way to get to either of those two without going through
macroexp--expand-all first.  So, yes, there is a guarantee.

When loading an interpreted file, we go through macroexp--expand-all as
well (not not through cconv.el nor through bytecomp.el).


reply via email to

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