]> git.eshelyaron.com Git - emacs.git/commitdiff
* eval.c (Fprogn): Check that BODY is a proper list.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Jul 2013 07:22:16 +0000 (08:22 +0100)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Jul 2013 07:22:16 +0000 (08:22 +0100)
etc/NEWS
src/ChangeLog
src/eval.c

index facadac5c1cc3d73b8b8cc9656f8d527877e24fe..e7d51a4033afd0e83fa5d4dd6a7bca34aed77533 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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.
 \f
 * Lisp Changes in Emacs 24.4
 
index 3d6725f6cd56ed0b822bff1979ed23f1a2fe56d2..cc8d7f5edeeea62c883624cf35c539f49b61fd2e 100644 (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)
index 6cb2b7a92b8d5bc6db36107df42ee4c8bbb70962..e6ccf0bdcb50bb591cbdda7e1b018d4b806753ba 100644 (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;
 }