diff options
| author | Stefan Monnier | 2012-11-09 15:45:10 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-11-09 15:45:10 -0500 |
| commit | da03ef8a9d38ef6f059aaeddb8c97dc7e76d3917 (patch) | |
| tree | 280a4752f68dc4b860575f73bfc7619a85e05afa | |
| parent | 6858633a9c9f7e764e017cc5cbf77516729d120b (diff) | |
| download | emacs-da03ef8a9d38ef6f059aaeddb8c97dc7e76d3917.tar.gz emacs-da03ef8a9d38ef6f059aaeddb8c97dc7e76d3917.zip | |
* lisp/subr.el (dolist): Don't bind VAR in RESULT.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 4 |
3 files changed, 8 insertions, 3 deletions
| @@ -28,6 +28,11 @@ so we will look at it and add it to the manual. | |||
| 28 | * Changes in Specialized Modes and Packages in Emacs 24.4 | 28 | * Changes in Specialized Modes and Packages in Emacs 24.4 |
| 29 | * New Modes and Packages in Emacs 24.4 | 29 | * New Modes and Packages in Emacs 24.4 |
| 30 | * Incompatible Lisp Changes in Emacs 24.4 | 30 | * Incompatible Lisp Changes in Emacs 24.4 |
| 31 | |||
| 32 | ** `dolist' in lexical-binding mode does not bind VAR in RESULT any more. | ||
| 33 | VAR was bound to nil which was not tremendously useful and just lead to | ||
| 34 | spurious warnings about an unused var. | ||
| 35 | |||
| 31 | * Lisp changes in Emacs 24.4 | 36 | * Lisp changes in Emacs 24.4 |
| 32 | 37 | ||
| 33 | ** Docstrings can be made dynamic by adding a `dynamic-docstring-function' | 38 | ** Docstrings can be made dynamic by adding a `dynamic-docstring-function' |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 612cdc33d52..6f10e311eac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * subr.el (dolist): Don't bind VAR in RESULT. | ||
| 4 | |||
| 3 | * emacs-lisp/advice.el: Miscellaneous cleanup. Use lexical-binding. | 5 | * emacs-lisp/advice.el: Miscellaneous cleanup. Use lexical-binding. |
| 4 | (fset, documentation): Don't save real def since we don't advise. | 6 | (fset, documentation): Don't save real def since we don't advise. |
| 5 | (ad-do-advised-functions): Remove problematic `result-form'. | 7 | (ad-do-advised-functions): Remove problematic `result-form'. |
diff --git a/lisp/subr.el b/lisp/subr.el index 9c89bd3e045..0ba932a3efe 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -222,9 +222,7 @@ Then evaluate RESULT to get return value, default nil. | |||
| 222 | (let ((,(car spec) (car ,temp))) | 222 | (let ((,(car spec) (car ,temp))) |
| 223 | ,@body | 223 | ,@body |
| 224 | (setq ,temp (cdr ,temp)))) | 224 | (setq ,temp (cdr ,temp)))) |
| 225 | ,@(if (cdr (cdr spec)) | 225 | ,@(cdr (cdr spec))) |
| 226 | ;; FIXME: This let often leads to "unused var" warnings. | ||
| 227 | `((let ((,(car spec) nil)) ,@(cdr (cdr spec)))))) | ||
| 228 | `(let ((,temp ,(nth 1 spec)) | 226 | `(let ((,temp ,(nth 1 spec)) |
| 229 | ,(car spec)) | 227 | ,(car spec)) |
| 230 | (while ,temp | 228 | (while ,temp |