bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13813: 24.3.50; eval-and-compile in macro inhibits let-binding of va


From: David Engster
Subject: bug#13813: 24.3.50; eval-and-compile in macro inhibits let-binding of variable
Date: Mon, 11 Mar 2013 21:57:21 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.93 (gnu/linux)

Stefan Monnier writes:
>> There is a flag called `eieio-error-unsupported-class-tags' which makes
>> `eieio-defclass' signal an error if a tag is unsupported. Since
>> `eieio-defclass' is the implementation of the `defclass' macro (wrapped
>
>> in `eval-and-comopile'), this flag has no effect if it is set in a
>> let-binding. To be specific, the test checks that this
>
>> (let ((eieio-error-unsupported-class-tags t))
>>  (defclass class-error ()
>>   ((error-slot :initarg :error-slot
>>             :badslottag 1))
>>   "A class with a bad slot tag."))
>
>> is throwing an error.
>
> My opinion (expressed in eieio.el via: "FIXME: Most of this should be
> moved to the `defclass' macro.") is that this tag-checking should be done
> when expanding the `defclass' macro rather than when running
> eieio-defclass.  So clearly, your let-binding wouldn't affect it when
> the code is byte-compiled (or when it's eagerly macroexpanded).
>
> IOW, to be sure to get what you want, you need to be more explicit, as in:
>
>    (let ((eieio-error-unsupported-class-tags t))
>      (eval '(defclass class-error ()
>               ((error-slot :initarg :error-slot
>                            :badslottag 1))
>               "A class with a bad slot tag.")))

So in yet other words, you don't see this as a bug? If so, then please
close this report and I'll have to discuss with Eric how we deal with
this on our side.

-David





reply via email to

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