3 |
;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. |
;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Colin Walters <walters@verbum.org> |
;; Author: Colin Walters <walters@verbum.org> |
6 |
|
;; Maintainer: John Paul Wallington <jpw@gnu.org> |
7 |
;; Created: 6 Dec 2001 |
;; Created: 6 Dec 2001 |
8 |
;; Keywords: buffer, convenience |
;; Keywords: buffer, convenience |
9 |
|
|
37 |
If TEST returns non-nil, bind `it' to the value, and evaluate |
If TEST returns non-nil, bind `it' to the value, and evaluate |
38 |
TRUE-BODY. Otherwise, evaluate forms in FALSE-BODY as if in `progn'. |
TRUE-BODY. Otherwise, evaluate forms in FALSE-BODY as if in `progn'. |
39 |
Compare with `if'." |
Compare with `if'." |
40 |
(let ((sym (gensym "--ibuffer-aif-"))) |
(let ((sym (make-symbol "ibuffer-aif-sym"))) |
41 |
`(let ((,sym ,test)) |
`(let ((,sym ,test)) |
42 |
(if ,sym |
(if ,sym |
43 |
(let ((it ,sym)) |
(let ((it ,sym)) |
56 |
|
|
57 |
(defmacro ibuffer-save-marks (&rest body) |
(defmacro ibuffer-save-marks (&rest body) |
58 |
"Save the marked status of the buffers and execute BODY; restore marks." |
"Save the marked status of the buffers and execute BODY; restore marks." |
59 |
(let ((bufsym (gensym))) |
(let ((bufsym (make-symbol "bufsym"))) |
60 |
`(let ((,bufsym (current-buffer)) |
`(let ((,bufsym (current-buffer)) |
61 |
(ibuffer-save-marks-tmp-mark-list (ibuffer-current-state-list))) |
(ibuffer-save-marks-tmp-mark-list (ibuffer-current-state-list))) |
62 |
(unwind-protect |
(unwind-protect |
125 |
|
|
126 |
;;;###autoload |
;;;###autoload |
127 |
(defmacro* define-ibuffer-sorter (name documentation |
(defmacro* define-ibuffer-sorter (name documentation |
128 |
(&key |
(&key |
129 |
description) |
description) |
130 |
&rest body) |
&rest body) |
131 |
"Define a method of sorting named NAME. |
"Define a method of sorting named NAME. |
152 |
;;;###autoload |
;;;###autoload |
153 |
(defmacro* define-ibuffer-op (op args |
(defmacro* define-ibuffer-op (op args |
154 |
documentation |
documentation |
155 |
(&key |
(&key |
156 |
interactive |
interactive |
157 |
mark |
mark |
158 |
modifier-p |
modifier-p |
253 |
|
|
254 |
;;;###autoload |
;;;###autoload |
255 |
(defmacro* define-ibuffer-filter (name documentation |
(defmacro* define-ibuffer-filter (name documentation |
256 |
(&key |
(&key |
257 |
reader |
reader |
258 |
description) |
description) |
259 |
&rest body) |
&rest body) |
267 |
will be evaluated with BUF bound to the buffer object, and QUALIFIER |
will be evaluated with BUF bound to the buffer object, and QUALIFIER |
268 |
bound to the current value of the filter." |
bound to the current value of the filter." |
269 |
(let ((fn-name (intern (concat "ibuffer-filter-by-" (symbol-name name))))) |
(let ((fn-name (intern (concat "ibuffer-filter-by-" (symbol-name name))))) |
270 |
`(progn |
`(progn |
271 |
(defun ,fn-name (qualifier) |
(defun ,fn-name (qualifier) |
272 |
,(concat (or documentation "This filter is not documented.")) |
,(concat (or documentation "This filter is not documented.")) |
273 |
(interactive (list ,reader)) |
(interactive (list ,reader)) |