;; Based on FSF code dating back to 1985.
;;; Code:
-
+
;;;Trying to preserve the old window configuration works well in
;;;simple scenarios, when you enter the buffer menu, use it, and exit it.
;;;But it does strange things when you switch back to the buffer list buffer
(setq revert-buffer-function 'Buffer-menu-revert-function)
(setq truncate-lines t)
(setq buffer-read-only t)
- (make-local-variable 'mouse-track-click-hook) ; XEmacs
- (add-hook 'mouse-track-click-hook 'Buffer-menu-maybe-mouse-select) ; XEmacs
+ (make-local-hook 'mouse-track-click-hook) ; XEmacs
+ (add-hook 'mouse-track-click-hook 'Buffer-menu-maybe-mouse-select t t) ; XEmacs
(run-hooks 'buffer-menu-mode-hook))
(defun Buffer-menu-revert-function (ignore1 ignore2)
(let ((buff-menu-buffer (current-buffer))
(buffer-read-only nil))
(while (search-forward "\nD" nil t)
- (forward-char -1)
+ (backward-char 1)
(let ((buf (Buffer-menu-buffer nil)))
(or (eq buf nil)
(eq buf buff-menu-buffer)
(progn (delete-char 1)
(insert ? ))
(delete-region (point) (progn (forward-line 1) (point)))
- (forward-char -1))))))
+ (backward-char 1))))))
(defun Buffer-menu-select ()
"Select this line's buffer; also display buffers marked with `>'.
in the selected frame."
(interactive)
(let ((buff (Buffer-menu-buffer t))
- (menu (current-buffer))
+ (menu (current-buffer))
(others ())
tem)
(goto-char (point-min))
\f
+(eval-when-compile (autoload 'visit-tags-table "etags"))
+
(defun Buffer-menu-visit-tags-table ()
"Visit the tags table in the buffer on this line. See `visit-tags-table'."
(interactive)
\f
;; XEmacs
(defvar list-buffers-header-line
- (purecopy (concat " MR Buffer Size Mode File\n"
- " -- ------ ---- ---- ----\n")))
+ (concat " MR Buffer Size Mode File\n"
+ " -- ------ ---- ---- ----\n"))
;; XEmacs
(defvar list-buffers-identification 'default-list-buffers-identification
(progn (setq current (point)) ?\.)
?\ ))
(insert (if (buffer-modified-p buffer)
- ?\*
+ ?\*
?\ ))
(insert (if ro
?\%
"Display a list of names of existing buffers.
The list is displayed in a buffer named `*Buffer List*'.
Note that buffers with names starting with spaces are omitted.
-Non-null optional arg FILES-ONLY means mention only file buffers.
+Non-nil optional arg FILES-ONLY means mention only file buffers.
The M column contains a * for buffers that are modified.
The R column contains a % for buffers that are read-only."
"Create and return a buffer with a list of names of existing buffers.
The buffer is named `*Buffer List*'.
Note that buffers with names starting with spaces are omitted.
-Non-null optional arg FILES-ONLY means mention only file buffers.
+Non-nil optional arg FILES-ONLY means mention only file buffers.
The M column contains a * for buffers that are modified.
The R column contains a % for buffers that are read-only."