;;; bs.el --- menu for selecting and displaying buffers
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Keywords: convenience
("" 2 2 left " "))
"*List specifying the layout of a Buffer Selection Menu buffer.
Each entry specifies a column and is a list of the form of:
-(HEADER MINIMUM-LENGTH MAXIMUM-LENGTH ALIGNMENT FUN-OR-STRING)
+\(HEADER MINIMUM-LENGTH MAXIMUM-LENGTH ALIGNMENT FUN-OR-STRING)
HEADER : string for header for first line or a function
which calculates column title.
MINIMUM-LENGTH : minimum width of column (number or name of function).
(setq ele (cdr ele)))
(concat res "$\\)")))
-;;; Font-Lock-Settings
+;; Font-Lock-Settings
(defvar bs-mode-font-lock-keywords
(list ;; header in font-lock-type-face
(list (bs--make-header-match-string)
(interactive)
(let ((current (bs--current-buffer))
(inhibit-read-only t))
+ (unless (kill-buffer current)
+ (error "Buffer was not deleted"))
(setq bs-current-list (delq current bs-current-list))
- (kill-buffer current)
(beginning-of-line)
(delete-region (point) (save-excursion
(end-of-line)
(bs-must-show-regexp bs-must-show-regexp)
(bs-dont-show-function bs-dont-show-function)
(bs-must-show-function bs-must-show-function)
- (bs--show-all bs--show-all))
- (if bs-cycle-configuration-name
- (bs-set-configuration bs-cycle-configuration-name))
+ (bs--show-all nil))
+ (bs-set-configuration (or bs-cycle-configuration-name bs-default-configuration))
(let ((bs-buffer-sort-function nil)
(bs--current-sort-function nil))
(let* ((tupel (bs-next-buffer (if (or (eq last-command
(bs-must-show-regexp bs-must-show-regexp)
(bs-dont-show-function bs-dont-show-function)
(bs-must-show-function bs-must-show-function)
- (bs--show-all bs--show-all))
- (if bs-cycle-configuration-name
- (bs-set-configuration bs-cycle-configuration-name))
+ (bs--show-all nil))
+ (bs-set-configuration (or bs-cycle-configuration-name bs-default-configuration))
(let ((bs-buffer-sort-function nil)
(bs--current-sort-function nil))
(let* ((tupel (bs-previous-buffer (if (or (eq last-command
START-BUFFER is the buffer where we started buffer selection.
ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu."
(let ((name (copy-sequence (buffer-name))))
- (put-text-property 0 (length name) 'mouse-face 'highlight name)
+ (add-text-properties
+ 0 (length name)
+ '(mouse-face highlight
+ help-echo
+ "mouse-2: select this buffer, mouse-3: select in other frame")
+ name)
(if (< (length name) bs--name-entry-length)
(concat name
(make-string (- bs--name-entry-length (length name)) ? ))
'(shell-mode dired-mode))
default-directory
(or buffer-file-name "")))))
- (put-text-property 0 (length string) 'mouse-face 'highlight string)
+ (add-text-properties
+ 0 (length string)
+ '(mouse-face highlight
+ help-echo "mouse-2: select this buffer, mouse-3: select in other frame")
+ string)
string))
(defun bs--insert-one-entry (buffer)
(setq bs--marked-buffers nil)
(bs--show-with-configuration (bs--configuration-name-for-prefix-arg arg)))
-;;; Now provide feature bs
+;; Now provide feature bs
(provide 'bs)
;;; bs.el ends here