emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 87925f1: ibuffer-do-view-other-frame: Display each


From: Tino Calancha
Subject: [Emacs-diffs] master 87925f1: ibuffer-do-view-other-frame: Display each buffer in a new frame
Date: Fri, 23 Sep 2016 06:20:36 +0000 (UTC)

branch: master
commit 87925f1125acf95439e4563f9a30864cadf7cafb
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    ibuffer-do-view-other-frame: Display each buffer in a new frame
    
    * lisp/ibuffer.el (ibuffer-do-view-1):
    When TYPE equals 'other-frame, then display each buffer
    in a new frame (Bug#24086).
---
 lisp/ibuffer.el |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 0336f1d..e965535 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1143,17 +1143,17 @@ a new window in the current frame, splitting 
vertically."
   (ibuffer-do-view-1 (if other-frame 'other-frame 'horizontally)))
 
 (defun ibuffer-do-view-1 (type)
-  (let ((marked-bufs (ibuffer-get-marked-buffers)))
-    (when (null marked-bufs)
-      (setq marked-bufs (list (ibuffer-current-buffer t))))
+  (let ((marked-bufs (or (ibuffer-get-marked-buffers)
+                         (list (ibuffer-current-buffer t)))))
     (unless (and (eq type 'other-frame)
                 (not ibuffer-expert)
                 (> (length marked-bufs) 3)
                 (not (y-or-n-p (format "Really create a new frame for %s 
buffers? "
                                        (length marked-bufs)))))
-      (set-buffer-modified-p nil)
-      (delete-other-windows)
-      (switch-to-buffer (pop marked-bufs))
+      (unless (eq type 'other-frame)
+        (set-buffer-modified-p nil)
+        (delete-other-windows)
+        (switch-to-buffer (pop marked-bufs)))
       (let ((height (/ (1- (if (eq type 'horizontally) (frame-width)
                             (frame-height)))
                       (1+ (length marked-bufs)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]