* Re: [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a proper list.
[not found] <E1V1Wvd-0008VA-LT@vcs.savannah.gnu.org>
@ 2013-07-23 13:12 ` Stefan Monnier
2013-07-24 6:26 ` Paul Eggert
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2013-07-23 13:12 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
> +** Special forms with implied progn now check for proper lists.
> +Starting in Emacs 21.4, a special form with an implied progn of an
> +improper list ignored the trailing value, treating it as nil. For
> +example, (cond (t (message "hello") . "there")) ignored the "there".
> +This inadvertent change to Emacs's behavior has been reverted, and
> +Emacs now signals an error for these improper forms, as it did in
> +version 21.3 and earlier.
I don't think it's a change worthy of documentation since it's probably
not even 100% true (I'd be surprised if the byte-compiler really
consistently signals an error in all those cases).
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, so those extra
checks are just a waste of time (and code space).
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a proper list.
2013-07-23 13:12 ` [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a proper list Stefan Monnier
@ 2013-07-24 6:26 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2013-07-24 6:26 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-24 6:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1V1Wvd-0008VA-LT@vcs.savannah.gnu.org>
2013-07-23 13:12 ` [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a proper list Stefan Monnier
2013-07-24 6:26 ` Paul Eggert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.