X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/037e65b496485cf3bd570a805bac787abac39cf3..d372248073cecc1d8ae1d6bed826692eab16274d:/lisp/bs.el diff --git a/lisp/bs.el b/lisp/bs.el index 95dc371e57..08d05a946e 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -1,6 +1,6 @@ ;;; bs.el --- menu for selecting and displaying buffers -*- lexical-binding: t -*- -;; Copyright (C) 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Olaf Sylvester ;; Maintainer: Olaf Sylvester ;; Keywords: convenience @@ -25,7 +25,7 @@ ;; Version: 1.17 ;; X-URL: http://www.geekware.de/software/emacs ;; -;; The bs-package contains a main function bs-show for poping up a +;; The bs-package contains a main function bs-show for popping up a ;; buffer in a way similar to `list-buffers' and `electric-buffer-list': ;; The new buffer offers a Buffer Selection Menu for manipulating ;; the buffer list and buffers. @@ -618,7 +618,7 @@ Used from `window-size-change-functions'." (put 'bs-mode 'mode-class 'special) (define-derived-mode bs-mode nil "Buffer-Selection-Menu" - "Major mode for editing a subset of Emacs' buffers. + "Major mode for editing a subset of Emacs's buffers. \\ Aside from two header lines each line describes one buffer. Move to a line representing the buffer you want to edit and select @@ -964,7 +964,7 @@ Default is `bs--current-sort-function'." Uses function `toggle-read-only'." (interactive) (with-current-buffer (bs--current-buffer) - (toggle-read-only)) + (call-interactively 'toggle-read-only)) (bs--update-current-line)) (defun bs-clear-modified () @@ -1212,11 +1212,10 @@ by buffer configuration `bs-cycle-configuration-name'." bs--cycle-list))) (next (car tupel)) (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)) - (switch-to-buffer next) + ;; We don't want the frame iconified if the only window in the frame + ;; happens to be dedicated. + (bury-buffer (current-buffer)) + (switch-to-buffer next nil t) (setq bs--cycle-list (append (cdr cycle-list) (list (car cycle-list)))) (bs-message-without-log "Next buffers: %s" @@ -1245,7 +1244,7 @@ by buffer configuration `bs-cycle-configuration-name'." bs--cycle-list))) (prev-buffer (car tupel)) (cycle-list (cdr tupel))) - (switch-to-buffer prev-buffer) + (switch-to-buffer prev-buffer nil t) (setq bs--cycle-list (append (last cycle-list) (reverse (cdr (reverse cycle-list))))) (bs-message-without-log "Previous buffers: %s" @@ -1415,8 +1414,8 @@ for buffer selection." (bs--restore-window-config) (setq bs--window-config-coming-from (current-window-configuration)) (when (> (window-height (selected-window)) 7) - (split-window-vertically) - (other-window 1))) + ;; Errors would mess with the window configuration (bug#10882). + (ignore-errors (select-window (split-window-below))))) (bs-show-in-buffer liste) (bs-message-without-log "%s" (bs--current-config-message)))))