From 7ca8fc42baeb89a0d5f84b6c8549fdf6f3d8d0e6 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 26 Jun 2011 13:23:23 +0200 Subject: [PATCH] lisp/bs.el (bs-cycle-next): Pass current buffer to `bury-buffer'. Fixes: debbugs:8911 --- lisp/ChangeLog | 5 +++++ lisp/bs.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d86248454b..0dde4aa62b 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 95dc371e57..73f8d0bf52 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)))) -- 2.39.2