summaryrefslogtreecommitdiff
path: root/lisp/buff-menu.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2006-05-26 19:11:45 +0000
committerEli Zaretskii <eliz@gnu.org>2006-05-26 19:11:45 +0000
commitfb5614e82d7acf6a7e2eb90477a5203a49450810 (patch)
tree675e07e37aec283be98c8c247bbb35d58f32e55b /lisp/buff-menu.el
parent3851cada29f1ff4e5b5d2987b6dbfd972faac849 (diff)
downloademacs-fb5614e82d7acf6a7e2eb90477a5203a49450810.tar.gz
(list-buffers-noselect): For Info buffers, use Info-current-file as the
file name.
Diffstat (limited to 'lisp/buff-menu.el')
-rw-r--r--lisp/buff-menu.el24
1 files changed, 20 insertions, 4 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 3094da3bfe8..4998c1edf07 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -116,6 +116,8 @@ This variable determines whether reverting the buffer lists only
file buffers. It affects both manual reverting and reverting by
Auto Revert Mode.")
+(defvar Info-current-file) ;; from info.el
+
(make-variable-buffer-local 'Buffer-menu-files-only)
(if Buffer-menu-mode-map
@@ -767,10 +769,24 @@ For more information, see the function `buffer-menu'."
?\s)))
(unless file
;; No visited file. Check local value of
- ;; list-buffers-directory.
- (when (and (boundp 'list-buffers-directory)
- list-buffers-directory)
- (setq file list-buffers-directory)))
+ ;; list-buffers-directory and, for Info buffers,
+ ;; Info-current-file.
+ (cond ((and (boundp 'list-buffers-directory)
+ list-buffers-directory)
+ (setq file list-buffers-directory))
+ ((eq major-mode 'Info-mode)
+ (setq file Info-current-file)
+ (cond
+ ((eq file t)
+ (setq file "*Info Directory*"))
+ ((eq file 'apropos)
+ (setq file "*Info Apropos*"))
+ ((eq file 'history)
+ (setq file "*Info History*"))
+ ((eq file 'toc)
+ (setq file "*Info TOC*"))
+ ((not (stringp file)) ;; avoid errors
+ (setq file nil))))))
(push (list buffer bits name (buffer-size) mode file)
list))))))
;; Preserve the original buffer-list ordering, just in case.