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-25.1.90~113^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cf3c19b0298236293d9c56d5ba425af4f42c1f8e;p=emacs.git * lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617) (cherry picked from commit f4ef1a1fea15aa58fbb5e7a59bff260720658e49) --- diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 9d23e64cd81..1295ed7a82d 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2336,7 +2336,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