emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r110860: * lisp/subr.el (dolist): Don


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110860: * lisp/subr.el (dolist): Don't bind VAR in RESULT.
Date: Fri, 09 Nov 2012 15:45:10 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110860
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-11-09 15:45:10 -0500
message:
  * lisp/subr.el (dolist): Don't bind VAR in RESULT.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/subr.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-11-09 04:10:16 +0000
+++ b/etc/NEWS  2012-11-09 20:45:10 +0000
@@ -28,6 +28,11 @@
 * Changes in Specialized Modes and Packages in Emacs 24.4
 * New Modes and Packages in Emacs 24.4
 * Incompatible Lisp Changes in Emacs 24.4
+
+** `dolist' in lexical-binding mode does not bind VAR in RESULT any more.
+VAR was bound to nil which was not tremendously useful and just lead to
+spurious warnings about an unused var.
+
 * Lisp changes in Emacs 24.4
 
 ** Docstrings can be made dynamic by adding a `dynamic-docstring-function'

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-11-09 20:41:03 +0000
+++ b/lisp/ChangeLog    2012-11-09 20:45:10 +0000
@@ -1,5 +1,7 @@
 2012-11-09  Stefan Monnier  <address@hidden>
 
+       * subr.el (dolist): Don't bind VAR in RESULT.
+
        * emacs-lisp/advice.el: Miscellaneous cleanup.  Use lexical-binding.
        (fset, documentation): Don't save real def since we don't advise.
        (ad-do-advised-functions): Remove problematic `result-form'.

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2012-11-08 19:45:58 +0000
+++ b/lisp/subr.el      2012-11-09 20:45:10 +0000
@@ -222,9 +222,7 @@
              (let ((,(car spec) (car ,temp)))
                ,@body
                (setq ,temp (cdr ,temp))))
-           ,@(if (cdr (cdr spec))
-                 ;; FIXME: This let often leads to "unused var" warnings.
-                 `((let ((,(car spec) nil)) ,@(cdr (cdr spec))))))
+           ,@(cdr (cdr spec)))
       `(let ((,temp ,(nth 1 spec))
              ,(car spec))
          (while ,temp


reply via email to

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