diff options
| author | Paul Eggert | 2013-07-23 08:22:16 +0100 |
|---|---|---|
| committer | Paul Eggert | 2013-07-23 08:22:16 +0100 |
| commit | f274311c2cad468abbe4bdbb25362e2fe6ccb5c2 (patch) | |
| tree | 7268693504863b47ec342b5d63b95198382f142d | |
| parent | a048c2955c000241dceba39112c3cb7c3d27b647 (diff) | |
| download | emacs-f274311c2cad468abbe4bdbb25362e2fe6ccb5c2.tar.gz emacs-f274311c2cad468abbe4bdbb25362e2fe6ccb5c2.zip | |
* eval.c (Fprogn): Check that BODY is a proper list.
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/eval.c | 6 |
3 files changed, 16 insertions, 0 deletions
| @@ -538,6 +538,14 @@ 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. | ||
| 541 | 549 | ||
| 542 | * Lisp Changes in Emacs 24.4 | 550 | * Lisp Changes in Emacs 24.4 |
| 543 | 551 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 3d6725f6cd5..cc8d7f5edee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2013-07-23 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2013-07-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * eval.c (Fprogn): Check that BODY is a proper list. | ||
| 4 | |||
| 3 | Tune UNEVALLED functions by using XCAR instead of Fcar, etc. | 5 | Tune UNEVALLED functions by using XCAR instead of Fcar, etc. |
| 4 | * data.c (Fsetq_default): | 6 | * data.c (Fsetq_default): |
| 5 | * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar) | 7 | * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar) |
diff --git a/src/eval.c b/src/eval.c index 6cb2b7a92b8..e6ccf0bdcb5 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -454,6 +454,12 @@ 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 | |||
| 457 | UNGCPRO; | 463 | UNGCPRO; |
| 458 | return val; | 464 | return val; |
| 459 | } | 465 | } |