changeset 70967:b4e6091c2346

(list-buffers-noselect): For Info buffers, use Info-current-file as the file name.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 26 May 2006 19:11:45 +0000
parents ea71fd2eadcb
children a26fd6a82aff
files lisp/buff-menu.el
diffstat 1 files changed, 20 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/buff-menu.el	Fri May 26 18:45:35 2006 +0000
+++ b/lisp/buff-menu.el	Fri May 26 19:11:45 2006 +0000
@@ -116,6 +116,8 @@
 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 @@
 			   ?\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.