]> code.delx.au - gnu-emacs/commitdiff
lisp/bs.el (bs-cycle-next): Pass current buffer to `bury-buffer'.
authorJuanma Barranquero <lekktu@gmail.com>
Sun, 26 Jun 2011 11:23:23 +0000 (13:23 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sun, 26 Jun 2011 11:23:23 +0000 (13:23 +0200)
Fixes: debbugs:8911
lisp/ChangeLog
lisp/bs.el

index d86248454be583168faee765d8a14a4e7f7f8c2f..0dde4aa62bbfc00b192ab446704d9804682000c0 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-26  Juanma Barranquero  <lekktu@gmail.com>
+
+       * bs.el (bs-cycle-next): Pass current buffer to `bury-buffer' to
+       avoid deleting the current window in some cases (bug#8911).
+
 2011-06-26  Andreas Schwab  <schwab@linux-m68k.org>
 
        * emacs-lisp/smie.el (smie-bnf->prec2): Fix last change.
index 95dc371e57b0398006f28c1d2babf61760f19926..73f8d0bf52ab4a3aff352401f674cf05d8056625 100644 (file)
@@ -1214,8 +1214,8 @@ by buffer configuration `bs-cycle-configuration-name'."
             (cycle-list (cdr tupel)))
        (unless (window-dedicated-p (selected-window))
          ;; We don't want the frame iconified if the only window in the frame
-         ;; happens to be dedicated; let's get the error from switch-to-buffer
-         (bury-buffer))
+         ;; happens to be dedicated
+         (bury-buffer (current-buffer)))
        (switch-to-buffer next)
        (setq bs--cycle-list (append (cdr cycle-list)
                                     (list (car cycle-list))))