aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2014-04-21 17:18:12 -0400
committerStefan Monnier2014-04-21 17:18:12 -0400
commit622eef687cedb8fbaf8ca529239f46968c2487f7 (patch)
tree7bde00069a04ff17f8c20b5f7acb8899ccabfb8d /lisp
parent505fa2ab43f38f623fb8f1653371a3a35d5d4b7f (diff)
downloademacs-622eef687cedb8fbaf8ca529239f46968c2487f7.tar.gz
emacs-622eef687cedb8fbaf8ca529239f46968c2487f7.zip
* lisp/emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/emacs-lisp/cl-macs.el6
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c1aef0c0f90..d25bf4b7597 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,11 @@
12014-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name.
4
12014-04-21 Michael Albinus <michael.albinus@gmx.de> 52014-04-21 Michael Albinus <michael.albinus@gmx.de>
2 6
3 * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Set 7 * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
4 "IFS=" when using read builtin, in order to preserve spaces in 8 Set "IFS=" when using read builtin, in order to preserve spaces in
5 the file name. Add test messages for hunting a bug on hydra. 9 the file name. Add test messages for hunting a bug on hydra.
6 (tramp-get-ls-command): Undo using "-b" argument. It doesn't help. 10 (tramp-get-ls-command): Undo using "-b" argument. It doesn't help.
7 11
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index cd2d52a4b21..1c163273b64 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1542,12 +1542,14 @@ If BODY is `setq', then use SPECS for assignments rather than for bindings."
1542 (if (and (cl--unused-var-p temp) (null expr)) 1542 (if (and (cl--unused-var-p temp) (null expr))
1543 nil ;; Don't bother declaring/setting `temp' since it won't 1543 nil ;; Don't bother declaring/setting `temp' since it won't
1544 ;; be used when `expr' is nil, anyway. 1544 ;; be used when `expr' is nil, anyway.
1545 (when (and (eq body 'setq) (cl--unused-var-p temp)) 1545 (when (or (null temp)
1546 (and (eq body 'setq) (cl--unused-var-p temp)))
1546 ;; Prefer a fresh uninterned symbol over "_to", to avoid 1547 ;; Prefer a fresh uninterned symbol over "_to", to avoid
1547 ;; warnings that we set an unused variable. 1548 ;; warnings that we set an unused variable.
1548 (setq temp (make-symbol "--cl-var--")) 1549 (setq temp (make-symbol "--cl-var--"))
1549 ;; Make sure this temp variable is locally declared. 1550 ;; Make sure this temp variable is locally declared.
1550 (push (list (list temp)) cl--loop-bindings)) 1551 (when (eq body 'setq)
1552 (push (list (list temp)) cl--loop-bindings)))
1551 (push (list temp expr) new)) 1553 (push (list temp expr) new))
1552 (while (consp spec) 1554 (while (consp spec)
1553 (push (list (pop spec) 1555 (push (list (pop spec)