;;; ibuffer.el --- operate on buffers like dired
;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
+;; published by the Free Software Foundation; either version 3, or (at
;; your option) any later version.
;; This program is distributed in the hope that it will be useful, but
(defvar ibuffer-tmp-hide-regexps)
(defvar ibuffer-tmp-show-regexps)
+(declare-function ibuffer-mark-on-buffer "ibuf-ext"
+ (func &optional ibuffer-mark-on-buffer-mark group))
+(declare-function ibuffer-format-qualifier "ibuf-ext" (qualifier))
+(declare-function ibuffer-generate-filter-groups "ibuf-ext"
+ (bmarklist &optional noempty nodefault))
+(declare-function ibuffer-format-filter-group-data "ibuf-ext" (filter))
+
(defgroup ibuffer nil
"An advanced replacement for `buffer-menu'.
(defcustom ibuffer-formats '((mark modified read-only " " (name 18 18 :left :elide)
" " (size 9 -1 :right)
- " " (mode 16 16 :right :elide) " " filename-and-process)
+ " " (mode 16 16 :left :elide) " " filename-and-process)
(mark " " (name 16 -1) " " filename))
"A list of ways to display buffer lines.
(defun ibuffer-map-lines (function &optional nomodify group)
"Call FUNCTION for each buffer.
-Don't set the ibuffer modification flag iff NOMODIFY is non-nil.
+Set the ibuffer modification flag unless NOMODIFY is non-nil.
If optional argument GROUP is non-nil, then only call FUNCTION on
buffers in filtering group GROUP.
(not (eq ibuffer-buf buf))))))
;; This function is a special case; it's not defined by
-;; `ibuffer-define-sorter'.
+;; `define-ibuffer-sorter'.
(defun ibuffer-do-sort-by-recency ()
"Sort the buffers by last view time."
(interactive)
(setq ibuffer-sorting-mode 'recency)
- (ibuffer-redisplay t))
+ (ibuffer-update nil t))
(defun ibuffer-update-format ()
(when (null ibuffer-current-format)
(defun ibuffer-quit ()
"Quit this `ibuffer' session.
-Try to restore the previous window configuration iff
+Try to restore the previous window configuration if
`ibuffer-restore-window-config-on-quit' is non-nil."
(interactive)
(if ibuffer-restore-window-config-on-quit
Other commands:
+ '\\[ibuffer-update]' - Regenerate the list of all buffers.
+ Prefix arg means to toggle whether buffers that match
+ `ibuffer-maybe-show-predicates' should be displayed.
+
'\\[ibuffer-switch-format]' - Change the current display format.
'\\[forward-line]' - Move point to the next line.
'\\[previous-line]' - Move point to the previous line.
- '\\[ibuffer-update]' - As above, but add new buffers to the list.
'\\[ibuffer-quit]' - Bury the Ibuffer buffer.
'\\[describe-mode]' - This help.
'\\[ibuffer-diff-with-file]' - View the differences between this buffer