emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a pro


From: Paul Eggert
Subject: [Emacs-diffs] trunk r113503: * eval.c (Fprogn): Check that BODY is a proper list.
Date: Tue, 23 Jul 2013 07:22:37 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113503
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-23 08:22:16 +0100
message:
  * eval.c (Fprogn): Check that BODY is a proper list.
modified:
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/eval.c                     eval.c-20091113204419-o5vbwnq5f7feedwu-237
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2013-07-22 09:17:21 +0000
+++ b/etc/NEWS  2013-07-23 07:22:16 +0000
@@ -538,6 +538,14 @@
 ** `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
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-07-23 06:48:34 +0000
+++ b/src/ChangeLog     2013-07-23 07:22:16 +0000
@@ -1,5 +1,7 @@
 2013-07-23  Paul Eggert  <address@hidden>
 
+       * 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)

=== modified file 'src/eval.c'
--- a/src/eval.c        2013-07-23 06:48:34 +0000
+++ b/src/eval.c        2013-07-23 07:22:16 +0000
@@ -454,6 +454,12 @@
       body = XCDR (body);
     }
 
+  if (!NILP (body))
+    {
+      /* This can happen if functions like Fcond are the caller.  */
+      wrong_type_argument (Qlistp, body);
+    }
+
   UNGCPRO;
   return val;
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]