summaryrefslogtreecommitdiff
path: root/lisp/buff-menu.el
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-02-01 22:07:03 -0500
committerMark Oteiza <mvoteiza@udel.edu>2017-02-01 22:57:23 -0500
commit141b085674e2945cc0c42bbe35548c368d1b023e (patch)
treeaa4947d408cf19aac9c9d3bd46cfce2e74148f3c /lisp/buff-menu.el
parent70d36dda26465b43c1a63e8e13153e070af86456 (diff)
downloademacs-141b085674e2945cc0c42bbe35548c368d1b023e.tar.gz
Treat list-buffers-directory as a string
Another step in the long history of list-buffers-directory. A thread branch discussing the meaning/use of the variable starts here https://lists.gnu.org/archive/html/emacs-devel/2009-09/msg00684.html Also see (info "(elisp) Buffer File Name"). * lisp/buff-menu.el: Relocate special case code into info.el. Nix Info-* defvars. (Buffer-menu--pretty-file-name): Remove special case. Use bound-and-true-p. (Buffer-menu-info-node-description): Remove. * lisp/ibuffer.el (ibuffer-buffer-file-name): Treat list-buffers-directory as a string. * lisp/info.el (Info-node-description): New function. (Info-select-node): Use it.
Diffstat (limited to 'lisp/buff-menu.el')
-rw-r--r--lisp/buff-menu.el19
1 files changed, 1 insertions, 18 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 77b325ff25d..9f618bcb7de 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -102,9 +102,6 @@ This is set by the prefix argument to `buffer-menu' and related
commands.")
(make-variable-buffer-local 'Buffer-menu-files-only)
-(defvar Info-current-file) ; from info.el
-(defvar Info-current-node) ; from info.el
-
(defvar Buffer-menu-mode-map
(let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
@@ -702,21 +699,7 @@ means list those buffers and no others."
(defun Buffer-menu--pretty-file-name (file)
(cond (file
(abbreviate-file-name file))
- ((and (boundp 'list-buffers-directory)
- list-buffers-directory)
- list-buffers-directory)
- ((eq major-mode 'Info-mode)
- (Buffer-menu-info-node-description Info-current-file))
+ ((bound-and-true-p list-buffers-directory))
(t "")))
-(defun Buffer-menu-info-node-description (file)
- (cond
- ((equal file "dir") "*Info Directory*")
- ((eq file 'apropos) "*Info Apropos*")
- ((eq file 'history) "*Info History*")
- ((eq file 'toc) "*Info TOC*")
- ((not (stringp file)) "") ; Avoid errors
- (t
- (concat "(" (file-name-nondirectory file) ") " Info-current-node))))
-
;;; buff-menu.el ends here