[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a
From: |
Paul Eggert |
Subject: |
Re: [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a proper list. |
Date: |
Wed, 24 Jul 2013 07:26:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 |
On 07/23/2013 02:12 PM, Stefan Monnier wrote:
> I don't even think it's a good change: it's good for the compiler to
> have such checks and signal errors, but the interpreter should mostly
> aim to be fast for correct code and safe for all code
Ah, sorry, I thought the Emacs Lisp interpreter was supposed to check
for errors. I undid the change in trunk bzr 113521.
I also added the following text to the Elisp manual to try to document
the situation. If this doesn't capture the intent please let me know.
----
If an expression's first symbol is that of a special form, the
expression should follow the rules of that special form; otherwise,
Emacs's behavior is not well-defined (though it will not crash). For
example, @code{((lambda (x) x . 3) 4)} contains a subexpression that
begins with @code{lambda} but is not a well-formed @code{lambda}
expression, so Emacs may signal an error, or may return 3 or 4 or
@code{nil}, or may behave in other ways.