]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid mapcar in two cases in files.el.
authorIvan Shmakov <ivan@siamics.net>
Sat, 17 Jan 2015 18:57:04 +0000 (18:57 +0000)
committerIvan Shmakov <ivan@siamics.net>
Sat, 17 Jan 2015 19:33:08 +0000 (19:33 +0000)
* lisp/files.el (find-file-other-window, find-file-other-frame):
Use mapc instead of mapcar.

Fixes: debbugs:18175
lisp/ChangeLog
lisp/files.el

index 9e3cedd50a1f2d8bfa1f3a4b5119a0a023897929..f5ad8de3f8c2d6008d7ae722998e29d5b905ab1e 100644 (file)
@@ -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  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/eieio-core.el (eieio--class-constructor): Rename from
index f8318d8a34de5236b2c3c95bdc362047f4dcab30..e6d80a9a4dc94454270477e26fd3950f41f525dd 100644 (file)
@@ -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)