diff lisp/buff-menu.el @ 90428:a8190f7e546e

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 285-296) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: admin/FOR-RELEASE: Update refcard section. * gnus--rel--5.10 (patch 102-104) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-64
author Miles Bader <miles@gnu.org>
date Wed, 07 Jun 2006 18:05:10 +0000
parents d1c5430c5bff b4e6091c2346
children 138ce2701550
line wrap: on
line diff
--- a/lisp/buff-menu.el	Wed Jun 07 11:41:58 2006 +0000
+++ b/lisp/buff-menu.el	Wed Jun 07 18:05:10 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.