;;; 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 <Olaf.Sylvester@netsurf.de>
;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Keywords: convenience
;; 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.
;; | % vc-hooks.el 43605 Emacs-Lisp /usr/share/emacs/19.34/lisp$|
;; -----------------------------------------------------------------------
-;;; Quick Installation und Customization:
+;;; Quick Installation and Customization:
;; To display the bs menu, do
;; M-x bs-show
(defun bs--mark-unmark (count fun)
"Call FUN on COUNT consecutive buffers of *buffer-selection*."
(let ((dir (if (> count 0) 1 -1)))
- (dotimes (i (abs count))
+ (dotimes (_i (abs count))
(let ((buffer (bs--current-buffer)))
(when buffer (funcall fun buffer))
(bs--update-current-line)
(defun bs--nth-wrapper (count fun &rest args)
"Call COUNT times function FUN with arguments ARGS."
- (dotimes (i (or count 1))
+ (dotimes (_i (or count 1))
(apply fun args)))
(defun bs-up (arg)
bs-dont-show-regexp (nth 3 list)
bs-dont-show-function (nth 4 list)
bs-buffer-sort-function (nth 5 list))
- ;; for backward compability
+ ;; for backward compatibility
(funcall (cdr list)))
;; else
(ding)
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"
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"
(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)))
+ (select-window (split-window-below))))
(bs-show-in-buffer liste)
(bs-message-without-log "%s" (bs--current-config-message)))))