From 141b085674e2945cc0c42bbe35548c368d1b023e Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Wed, 1 Feb 2017 22:07:03 -0500 Subject: 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. --- lisp/info.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp/info.el') diff --git a/lisp/info.el b/lisp/info.el index e32b6b35632..0cfcec32f82 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1599,6 +1599,16 @@ escaped (\\\",\\\\)." parameter-alist)) parameter-alist)) +(defun 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)))) + (defun Info-display-images-node () "Display images in current node." (save-excursion @@ -1693,6 +1703,7 @@ escaped (\\\",\\\\)." (setq Info-history-forward nil)) (if (not (eq Info-fontify-maximum-menu-size nil)) (Info-fontify-node)) + (setq list-buffers-directory (Info-node-description Info-current-file)) (Info-display-images-node) (Info-hide-cookies-node) (run-hooks 'Info-selection-hook))))) -- cgit v1.2.1