]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Bug#32454
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 16 Aug 2018 15:26:37 +0000 (17:26 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 16 Aug 2018 15:26:37 +0000 (17:26 +0200)
* lisp/files.el (find-alternate-file): Handle the wildcards case.
(Bug#32454)

lisp/files.el

index 8057def5259b015a980bad0726b2c546f98341cb..da4f2cd78feca804884d289483a0432a86c90333 100644 (file)
@@ -1831,7 +1831,7 @@ killed."
           ;; in some corner cases, e.g. when the selected window is
           ;; softly-dedicated.
          (let ((newbuf (find-file-noselect filename nil nil wildcards)))
-            (switch-to-buffer newbuf)))
+            (switch-to-buffer (if (consp newbuf) (car newbuf) newbuf))))
       (when (eq obuf (current-buffer))
        ;; This executes if find-file gets an error
        ;; and does not really find anything.