From: Tino Calancha Date: Wed, 8 Jun 2016 00:35:24 +0000 (-0400) Subject: * lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617) X-Git-Tag: emacs-26.0.90~1842^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4ef1a1fea15aa58fbb5e7a59bff260720658e49;p=emacs.git * lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617) --- diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index dd2687c4d8c..609524ccd20 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2341,7 +2341,8 @@ FORMATS is the value to use for `ibuffer-formats'. (setq other-window-p t)) (let ((buf (get-buffer-create (or name "*Ibuffer*")))) (if other-window-p - (funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf) + (or (and noselect (display-buffer buf t)) + (pop-to-buffer buf t)) (funcall (if noselect #'display-buffer #'switch-to-buffer) buf)) (with-current-buffer buf (save-selected-window