From: Paul Eggert Date: Wed, 24 Jul 2013 06:21:07 +0000 (+0100) Subject: * src/eval.c (Fprogn): Do not check that BODY is a proper list. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1710^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=53840e556ef5b78e05ec2f948b7742e38821d9e5;p=emacs.git * src/eval.c (Fprogn): Do not check that BODY is a proper list. This undoes the previous change. The check slows down the interpreter, and is not needed to prevent a crash. See . * doc/lispref/eval.texi (Special Forms): Mention 'lambda'. Also, say that non-well-formed expressions result in unspecified behavior, though Emacs will not crash. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 342c7c57175..08ec4c2fef8 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2013-07-24 Paul Eggert + + * eval.texi (Special Forms): Mention 'lambda'. Also, say that + non-well-formed expressions result in unspecified behavior, though + Emacs will not crash. + 2013-07-22 Michael Albinus * files.texi (Magic File Names): Add file-notify-add-watch, diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index 4b5ef187383..4b83d575fef 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -432,6 +432,14 @@ do. and which are used without evaluation. Whether a particular argument is evaluated may depend on the results of evaluating other arguments. + 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. + Here is a list, in alphabetical order, of all of the special forms in Emacs Lisp with a reference to where each is described. @@ -463,6 +471,9 @@ Emacs Lisp with a reference to where each is described. @item interactive @pxref{Interactive Call} +@item lambda +@pxref{Lambda Expressions} + @item let @itemx let* @pxref{Local Variables} diff --git a/etc/NEWS b/etc/NEWS index e7d51a4033a..facadac5c1c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -538,14 +538,6 @@ file using `set-file-extended-attributes'. ** `visited-file-modtime' now returns -1 for nonexistent files. Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous in the presence of files with negative time stamps. - -** 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. * Lisp Changes in Emacs 24.4 diff --git a/src/ChangeLog b/src/ChangeLog index 30cc0dcdac6..51a5da68877 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-07-24 Paul Eggert + + * eval.c (Fprogn): Do not check that BODY is a proper list. + This undoes the previous change. The check slows down the + interpreter, and is not needed to prevent a crash. See + . + 2013-07-23 Glenn Morris * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists. diff --git a/src/eval.c b/src/eval.c index e6ccf0bdcb5..6cb2b7a92b8 100644 --- a/src/eval.c +++ b/src/eval.c @@ -454,12 +454,6 @@ usage: (progn BODY...) */) body = XCDR (body); } - if (!NILP (body)) - { - /* This can happen if functions like Fcond are the caller. */ - wrong_type_argument (Qlistp, body); - } - UNGCPRO; return val; }