summaryrefslogtreecommitdiff
path: root/lisp/ibuffer.el
diff options
context:
space:
mode:
authorJohn Paul Wallington <jpw@pobox.com>2008-05-13 21:07:21 +0000
committerJohn Paul Wallington <jpw@pobox.com>2008-05-13 21:07:21 +0000
commit92cb2eaf1cc0ad3389bef3c8761cd648f2e9e7a4 (patch)
treed1ed1fadb7e310b23b380070a9bc532204337dd6 /lisp/ibuffer.el
parenta1feed48fe2e123e7306c96e19a383f47965528a (diff)
downloademacs-92cb2eaf1cc0ad3389bef3c8761cd648f2e9e7a4.tar.gz
(ibuffer-buffer-file-name): New function.
(define-ibuffer-column filename): Use it.
Diffstat (limited to 'lisp/ibuffer.el')
-rw-r--r--lisp/ibuffer.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 7708c4dc49e..085a95a65f9 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1233,6 +1233,17 @@ a new window in the current frame, splitting vertically."
(defsubst ibuffer-map-deletion-lines (func)
(ibuffer-map-on-mark ibuffer-deletion-char func))
+(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)))
+ (and (memq major-mode '(cvs-mode vc-dir-mode))
+ (bound-and-true-p default-directory)))))
+ (and dirname (expand-file-name dirname)))
+ ""))
+
(define-ibuffer-op ibuffer-do-save ()
"Save marked buffers as with `save-buffer'."
(:complex t
@@ -1753,14 +1764,7 @@ If point is on a group name, this function operates on that group."
(t (format "%d files" total))))))
(let ((directory-abbrev-alist ibuffer-directory-abbrev-alist))
(abbreviate-file-name
- (or buffer-file-name
- (and (boundp 'dired-directory)
- (if (stringp dired-directory)
- dired-directory
- (car dired-directory)))
- (and (eq major-mode 'vc-dir-mode)
- (bound-and-true-p default-directory))
- ""))))
+ (ibuffer-buffer-file-name))))
(define-ibuffer-column filename-and-process
(:name "Filename/Process"