213 |
If a function, it will be called with the buffer as an argument, and |
If a function, it will be called with the buffer as an argument, and |
214 |
should return non-nil if this buffer should be shown. |
should return non-nil if this buffer should be shown. |
215 |
|
|
216 |
Viewing of buffers hidden because of these predicates is enabled by |
Viewing of buffers hidden because of these predicates may be customized |
217 |
giving a non-nil prefix argument to `ibuffer-update'. Note that this |
via `ibuffer-default-display-maybe-show-predicates' and is toggled by |
218 |
specialized filtering occurs before real filtering." |
giving a non-nil prefix argument to `ibuffer-update'. |
219 |
|
Note that this specialized filtering occurs before real filtering." |
220 |
:type '(repeat (choice regexp function)) |
:type '(repeat (choice regexp function)) |
221 |
:group 'ibuffer) |
:group 'ibuffer) |
222 |
|
|
223 |
|
(defcustom ibuffer-default-display-maybe-show-predicates nil |
224 |
|
"Non-nil means show buffers that match `ibuffer-maybe-show-predicates'." |
225 |
|
:type 'boolean |
226 |
|
:group 'ibuffer) |
227 |
|
|
228 |
|
(defvar ibuffer-display-maybe-show-predicates nil) |
229 |
|
|
230 |
(defvar ibuffer-current-format nil) |
(defvar ibuffer-current-format nil) |
231 |
|
|
232 |
(defcustom ibuffer-movement-cycle t |
(defcustom ibuffer-movement-cycle t |
2077 |
|
|
2078 |
(defun ibuffer-update (arg &optional silent) |
(defun ibuffer-update (arg &optional silent) |
2079 |
"Regenerate the list of all buffers. |
"Regenerate the list of all buffers. |
2080 |
Display buffers whose name matches one of `ibuffer-maybe-show-predicates' |
|
2081 |
iff arg ARG is non-nil. |
Prefix arg non-nil means to toggle whether buffers that match |
2082 |
|
`ibuffer-maybe-show-predicates' should be displayed. |
2083 |
|
|
2084 |
If optional arg SILENT is non-nil, do not display progress messages." |
If optional arg SILENT is non-nil, do not display progress messages." |
2085 |
(interactive "P") |
(interactive "P") |
2086 |
|
(if arg |
2087 |
|
(setq ibuffer-display-maybe-show-predicates |
2088 |
|
(not ibuffer-display-maybe-show-predicates))) |
2089 |
(ibuffer-forward-line 0) |
(ibuffer-forward-line 0) |
2090 |
(let* ((bufs (buffer-list)) |
(let* ((bufs (buffer-list)) |
2091 |
(blist (ibuffer-filter-buffers |
(blist (ibuffer-filter-buffers |
2098 |
(caddr bufs) |
(caddr bufs) |
2099 |
(cadr bufs)) |
(cadr bufs)) |
2100 |
(ibuffer-current-buffers-with-marks bufs) |
(ibuffer-current-buffers-with-marks bufs) |
2101 |
arg))) |
ibuffer-display-maybe-show-predicates))) |
2102 |
(when (null blist) |
(when (null blist) |
2103 |
(if (and (featurep 'ibuf-ext) |
(if (and (featurep 'ibuf-ext) |
2104 |
ibuffer-filtering-qualifiers) |
ibuffer-filtering-qualifiers) |
2160 |
'ibuffer-filter-group |
'ibuffer-filter-group |
2161 |
name))) |
name))) |
2162 |
|
|
2163 |
(defun ibuffer-redisplay-engine (bmarklist &optional all) |
(defun ibuffer-redisplay-engine (bmarklist &optional ignore) |
2164 |
(assert (eq major-mode 'ibuffer-mode)) |
(assert (eq major-mode 'ibuffer-mode)) |
2165 |
(let* ((--ibuffer-insert-buffers-and-marks-format |
(let* ((--ibuffer-insert-buffers-and-marks-format |
2166 |
(ibuffer-current-format)) |
(ibuffer-current-format)) |
2487 |
ibuffer-default-sorting-reversep) |
ibuffer-default-sorting-reversep) |
2488 |
(set (make-local-variable 'ibuffer-shrink-to-minimum-size) |
(set (make-local-variable 'ibuffer-shrink-to-minimum-size) |
2489 |
ibuffer-default-shrink-to-minimum-size) |
ibuffer-default-shrink-to-minimum-size) |
2490 |
|
(set (make-local-variable 'ibuffer-display-maybe-show-predicates) |
2491 |
|
ibuffer-default-display-maybe-show-predicates) |
2492 |
(set (make-local-variable 'ibuffer-filtering-qualifiers) nil) |
(set (make-local-variable 'ibuffer-filtering-qualifiers) nil) |
2493 |
(set (make-local-variable 'ibuffer-filter-groups) nil) |
(set (make-local-variable 'ibuffer-filter-groups) nil) |
2494 |
(set (make-local-variable 'ibuffer-filter-group-kill-ring) nil) |
(set (make-local-variable 'ibuffer-filter-group-kill-ring) nil) |