aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/buff-menu.el
diff options
context:
space:
mode:
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
116file buffers. It affects both manual reverting and reverting by 116file buffers. It affects both manual reverting and reverting by
117Auto Revert Mode.") 117Auto Revert Mode.")
118 118
119(defvar Info-current-file) ;; from info.el
120
119(make-variable-buffer-local 'Buffer-menu-files-only) 121(make-variable-buffer-local 'Buffer-menu-files-only)
120 122
121(if Buffer-menu-mode-map 123(if Buffer-menu-mode-map
@@ -767,10 +769,24 @@ For more information, see the function `buffer-menu'."
767 ?\s))) 769 ?\s)))
768 (unless file 770 (unless file
769 ;; No visited file. Check local value of 771 ;; No visited file. Check local value of
770 ;; list-buffers-directory. 772 ;; list-buffers-directory and, for Info buffers,
771 (when (and (boundp 'list-buffers-directory) 773 ;; Info-current-file.
772 list-buffers-directory) 774 (cond ((and (boundp 'list-buffers-directory)
773 (setq file list-buffers-directory))) 775 list-buffers-directory)
776 (setq file list-buffers-directory))
777 ((eq major-mode 'Info-mode)
778 (setq file Info-current-file)
779 (cond
780 ((eq file t)
781 (setq file "*Info Directory*"))
782 ((eq file 'apropos)
783 (setq file "*Info Apropos*"))
784 ((eq file 'history)
785 (setq file "*Info History*"))
786 ((eq file 'toc)
787 (setq file "*Info TOC*"))
788 ((not (stringp file)) ;; avoid errors
789 (setq file nil))))))
774 (push (list buffer bits name (buffer-size) mode file) 790 (push (list buffer bits name (buffer-size) mode file)
775 list)))))) 791 list))))))
776 ;; Preserve the original buffer-list ordering, just in case. 792 ;; Preserve the original buffer-list ordering, just in case.