summaryrefslogtreecommitdiff
path: root/lisp/ibuf-ext.el
diff options
context:
space:
mode:
authorJohn Paul Wallington <jpw@pobox.com>2004-09-14 20:07:07 +0000
committerJohn Paul Wallington <jpw@pobox.com>2004-09-14 20:07:07 +0000
commita386a960b25ff04482e5316585457bca8435c3d9 (patch)
treedb18f547fa204f395b674ff6801aec40915ba526 /lisp/ibuf-ext.el
parent46b00436e7462db7f94dfa4b057259ab3262a2a4 (diff)
downloademacs-a386a960b25ff04482e5316585457bca8435c3d9.tar.gz
(define-ibuffer-filter filename): Consider `dired-directory' if buffer
has no file name. From Sean O'Rourke <sorourke@cs.ucsd.edu>.
Diffstat (limited to 'lisp/ibuf-ext.el')
-rw-r--r--lisp/ibuf-ext.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 96678d2bc9a..b7e6741e9d4 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1015,7 +1015,10 @@ currently used by buffers."
"Toggle current view to buffers with filename matching QUALIFIER."
(:description "filename"
:reader (read-from-minibuffer "Filter by filename (regexp): "))
- (ibuffer-awhen (buffer-file-name buf)
+ (ibuffer-awhen (with-current-buffer buf
+ (or buffer-file-name
+ (and (boundp 'dired-directory)
+ dired-directory)))
(string-match qualifier it)))
;;;###autoload (autoload 'ibuffer-filter-by-size-gt "ibuf-ext.el")