[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3e824b0 2/6: Avoid mapcar in two cases in files.el.
From: |
Ivan Shmakov |
Subject: |
[Emacs-diffs] master 3e824b0 2/6: Avoid mapcar in two cases in files.el. |
Date: |
Sat, 17 Jan 2015 20:04:25 +0000 |
branch: master
commit 3e824b05af3a75768a61001fad68e2340af810eb
Author: Ivan Shmakov <address@hidden>
Commit: Ivan Shmakov <address@hidden>
Avoid mapcar in two cases in files.el.
* lisp/files.el (find-file-other-window, find-file-other-frame):
Use mapc instead of mapcar.
Fixes: debbugs:18175
---
lisp/ChangeLog | 3 +++
lisp/files.el | 10 ++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9e3cedd..f5ad8de 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,9 @@
* url/url-cookie.el (url-cookie-write-file): Let-bind print-length
and print-level to nil to avoid writing a garbled list. (Bug#16805)
+ * files.el (find-file-other-window, find-file-other-frame):
+ Use mapc instead of mapcar. (Bug#18175)
+
2015-01-17 Stefan Monnier <address@hidden>
* emacs-lisp/eieio-core.el (eieio--class-constructor): Rename from
diff --git a/lisp/files.el b/lisp/files.el
index f8318d8..e6d80a9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1489,8 +1489,9 @@ expand wildcards (if any) and visit multiple files."
(if (listp value)
(progn
(setq value (nreverse value))
- (cons (switch-to-buffer-other-window (car value))
- (mapcar 'switch-to-buffer (cdr value))))
+ (switch-to-buffer-other-window (car value))
+ (mapc 'switch-to-buffer (cdr value))
+ value)
(switch-to-buffer-other-window value))))
(defun find-file-other-frame (filename &optional wildcards)
@@ -1512,8 +1513,9 @@ expand wildcards (if any) and visit multiple files."
(if (listp value)
(progn
(setq value (nreverse value))
- (cons (switch-to-buffer-other-frame (car value))
- (mapcar 'switch-to-buffer (cdr value))))
+ (switch-to-buffer-other-frame (car value))
+ (mapc 'switch-to-buffer (cdr value))
+ value)
(switch-to-buffer-other-frame value))))
(defun find-file-existing (filename)
- [Emacs-diffs] master updated (ca80ebc -> 0aaa5d6), Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master e000ff3 3/6: Fix dir-locals handling for non-file buffers., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 3e824b0 2/6: Avoid mapcar in two cases in files.el.,
Ivan Shmakov <=
- [Emacs-diffs] master 22441b6 1/6: Ignore print-length and print-level while formatting url-cookie data., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master e391d88 5/6: Do not clear the session when trying to read a non-existent desktop file., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 1728544 4/6: Fix: inhibit point motion hooks when encoding an enriched document., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 0aaa5d6 6/6: Unloading support for misearch., Ivan Shmakov, 2015/01/17