summaryrefslogtreecommitdiff
path: root/lisp/ibuffer.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/ibuffer.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/ibuffer.el')
-rw-r--r--lisp/ibuffer.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index c6e5e471a36..71bf1d6dcc2 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1319,13 +1319,14 @@ a new window in the current frame, splitting vertically."
(cl-assert (derived-mode-p 'ibuffer-mode)))
(defun ibuffer-buffer-file-name ()
- (or buffer-file-name
- (let ((dirname (or (and (boundp 'dired-directory)
- (if (stringp dired-directory)
- dired-directory
- (car dired-directory)))
- (bound-and-true-p list-buffers-directory))))
- (and dirname (expand-file-name dirname)))))
+ (cond
+ ((buffer-file-name))
+ ((bound-and-true-p list-buffers-directory))
+ ((let ((dirname (and (boundp 'dired-directory)
+ (if (stringp dired-directory)
+ dired-directory
+ (car dired-directory)))))
+ (and dirname (expand-file-name dirname))))))
(define-ibuffer-op ibuffer-do-save ()
"Save marked buffers as with `save-buffer'."