* eval.c (Fprogn): Check that BODY is a proper list.

This commit is contained in:
Paul Eggert 2013-07-23 08:22:16 +01:00
parent a048c2955c
commit f274311c2c
3 changed files with 16 additions and 0 deletions

View file

@ -538,6 +538,14 @@ 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

View file

@ -1,5 +1,7 @@
2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
* eval.c (Fprogn): Check that BODY is a proper list.
Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
* data.c (Fsetq_default):
* eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)

View file

@ -454,6 +454,12 @@ 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;
}