diff options
| author | Paul Eggert | 2013-07-24 07:21:07 +0100 |
|---|---|---|
| committer | Paul Eggert | 2013-07-24 07:21:07 +0100 |
| commit | 53840e556ef5b78e05ec2f948b7742e38821d9e5 (patch) | |
| tree | a7bb7ce94837b2f954bbd81c4566076d66ecefdc | |
| parent | 249eea30ee8201fe9b872cf2c110aa546479b0e4 (diff) | |
| download | emacs-53840e556ef5b78e05ec2f948b7742e38821d9e5.tar.gz emacs-53840e556ef5b78e05ec2f948b7742e38821d9e5.zip | |
* 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
<http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
* doc/lispref/eval.texi (Special Forms): Mention 'lambda'. Also, say that
non-well-formed expressions result in unspecified behavior, though
Emacs will not crash.
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/eval.texi | 11 | ||||
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/eval.c | 6 |
5 files changed, 24 insertions, 14 deletions
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 @@ | |||
| 1 | 2013-07-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * eval.texi (Special Forms): Mention 'lambda'. Also, say that | ||
| 4 | non-well-formed expressions result in unspecified behavior, though | ||
| 5 | Emacs will not crash. | ||
| 6 | |||
| 1 | 2013-07-22 Michael Albinus <michael.albinus@gmx.de> | 7 | 2013-07-22 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * files.texi (Magic File Names): Add file-notify-add-watch, | 9 | * 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. | |||
| 432 | and which are used without evaluation. Whether a particular argument is | 432 | and which are used without evaluation. Whether a particular argument is |
| 433 | evaluated may depend on the results of evaluating other arguments. | 433 | evaluated may depend on the results of evaluating other arguments. |
| 434 | 434 | ||
| 435 | If an expression's first symbol is that of a special form, the | ||
| 436 | expression should follow the rules of that special form; otherwise, | ||
| 437 | Emacs's behavior is not well-defined (though it will not crash). For | ||
| 438 | example, @code{((lambda (x) x . 3) 4)} contains a subexpression that | ||
| 439 | begins with @code{lambda} but is not a well-formed @code{lambda} | ||
| 440 | expression, so Emacs may signal an error, or may return 3 or 4 or | ||
| 441 | @code{nil}, or may behave in other ways. | ||
| 442 | |||
| 435 | Here is a list, in alphabetical order, of all of the special forms in | 443 | Here is a list, in alphabetical order, of all of the special forms in |
| 436 | Emacs Lisp with a reference to where each is described. | 444 | Emacs Lisp with a reference to where each is described. |
| 437 | 445 | ||
| @@ -463,6 +471,9 @@ Emacs Lisp with a reference to where each is described. | |||
| 463 | @item interactive | 471 | @item interactive |
| 464 | @pxref{Interactive Call} | 472 | @pxref{Interactive Call} |
| 465 | 473 | ||
| 474 | @item lambda | ||
| 475 | @pxref{Lambda Expressions} | ||
| 476 | |||
| 466 | @item let | 477 | @item let |
| 467 | @itemx let* | 478 | @itemx let* |
| 468 | @pxref{Local Variables} | 479 | @pxref{Local Variables} |
| @@ -538,14 +538,6 @@ file using `set-file-extended-attributes'. | |||
| 538 | ** `visited-file-modtime' now returns -1 for nonexistent files. | 538 | ** `visited-file-modtime' now returns -1 for nonexistent files. |
| 539 | Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous | 539 | Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous |
| 540 | in the presence of files with negative time stamps. | 540 | in the presence of files with negative time stamps. |
| 541 | |||
| 542 | ** Special forms with implied progn now check for proper lists. | ||
| 543 | Starting in Emacs 21.4, a special form with an implied progn of an | ||
| 544 | improper list ignored the trailing value, treating it as nil. For | ||
| 545 | example, (cond (t (message "hello") . "there")) ignored the "there". | ||
| 546 | This inadvertent change to Emacs's behavior has been reverted, and | ||
| 547 | Emacs now signals an error for these improper forms, as it did in | ||
| 548 | version 21.3 and earlier. | ||
| 549 | 541 | ||
| 550 | * Lisp Changes in Emacs 24.4 | 542 | * Lisp Changes in Emacs 24.4 |
| 551 | 543 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 30cc0dcdac6..51a5da68877 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-07-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * eval.c (Fprogn): Do not check that BODY is a proper list. | ||
| 4 | This undoes the previous change. The check slows down the | ||
| 5 | interpreter, and is not needed to prevent a crash. See | ||
| 6 | <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>. | ||
| 7 | |||
| 1 | 2013-07-23 Glenn Morris <rgm@gnu.org> | 8 | 2013-07-23 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists. | 10 | * 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...) */) | |||
| 454 | body = XCDR (body); | 454 | body = XCDR (body); |
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | if (!NILP (body)) | ||
| 458 | { | ||
| 459 | /* This can happen if functions like Fcond are the caller. */ | ||
| 460 | wrong_type_argument (Qlistp, body); | ||
| 461 | } | ||
| 462 | |||
| 463 | UNGCPRO; | 457 | UNGCPRO; |
| 464 | return val; | 458 | return val; |
| 465 | } | 459 | } |