From: Juanma Barranquero Date: Sun, 26 Jun 2011 11:23:23 +0000 (+0200) Subject: lisp/bs.el (bs-cycle-next): Pass current buffer to `bury-buffer'. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~391 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ca8fc42baeb89a0d5f84b6c8549fdf6f3d8d0e6;p=emacs.git lisp/bs.el (bs-cycle-next): Pass current buffer to `bury-buffer'. Fixes: debbugs:8911 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d86248454be..0dde4aa62bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-06-26 Juanma Barranquero + + * 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 * emacs-lisp/smie.el (smie-bnf->prec2): Fix last change. diff --git a/lisp/bs.el b/lisp/bs.el index 95dc371e57b..73f8d0bf52a 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -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))))