[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/ibuf-macs.el
From: |
Colin Walters |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/ibuf-macs.el |
Date: |
Sun, 03 Feb 2002 22:57:35 -0500 |
Index: emacs/lisp/ibuf-macs.el
diff -c emacs/lisp/ibuf-macs.el:1.2 emacs/lisp/ibuf-macs.el:1.3
*** emacs/lisp/ibuf-macs.el:1.2 Wed Jan 16 01:33:20 2002
--- emacs/lisp/ibuf-macs.el Sun Feb 3 22:57:35 2002
***************
*** 71,77 ****
;; (put 'ibuffer-save-marks 'lisp-indent-function 0)
;;;###autoload
! (defmacro* define-ibuffer-column (symbol (&key name inline props) &rest body)
"Define a column SYMBOL for use with `ibuffer-formats'.
BODY will be called with `buffer' bound to the buffer object, and
--- 71,78 ----
;; (put 'ibuffer-save-marks 'lisp-indent-function 0)
;;;###autoload
! (defmacro* define-ibuffer-column (symbol (&key name inline props
! summarizer) &rest body)
"Define a column SYMBOL for use with `ibuffer-formats'.
BODY will be called with `buffer' bound to the buffer object, and
***************
*** 81,87 ****
If NAME is given, it will be used as a title for the column.
Otherwise, the title will default to a capitalized version of the
SYMBOL's name. PROPS is a plist of additional properties to add to
! the text, such as `mouse-face'.
Note that this macro expands into a `defun' for a function named
ibuffer-make-column-NAME. If INLINE is non-nil, then the form will be
--- 82,90 ----
If NAME is given, it will be used as a title for the column.
Otherwise, the title will default to a capitalized version of the
SYMBOL's name. PROPS is a plist of additional properties to add to
! the text, such as `mouse-face'. And SUMMARIZER, if given, is a
! function which will be passed a list of all the strings in its column;
! it should return a string to display at the bottom.
Note that this macro expands into a `defun' for a function named
ibuffer-make-column-NAME. If INLINE is non-nil, then the form will be
***************
*** 90,97 ****
`ibuffer-recompile-formats'."
(let* ((sym (intern (concat "ibuffer-make-column-"
(symbol-name symbol))))
! (bod-1 `(with-current-buffer buffer
,@body))
(bod (if props
`(propertize
,bod-1
--- 93,106 ----
`ibuffer-recompile-formats'."
(let* ((sym (intern (concat "ibuffer-make-column-"
(symbol-name symbol))))
! (bod-2 `(with-current-buffer buffer
,@body))
+ (bod-1 (if summarizer
+ `(car
+ (push ,bod-2
+ ,(intern (format "ibuffer-summary-for-column-%s"
+ name))))
+ bod-2))
(bod (if props
`(propertize
,bod-1
***************
*** 106,111 ****
--- 115,127 ----
,(if (stringp name)
name
(capitalize (symbol-name symbol))))
+ ,(if summarizer
+ `(put (quote ,sym) 'ibuffer-column-summarizer
+ (quote ,summarizer)))
+ ,(if summarizer
+ `(defvar ,(intern (format "ibuffer-summary-for-column-%s"
+ name))
+ nil))
:autoload-end)))
;; (put 'define-ibuffer-column 'lisp-indent-function 'defun)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/ibuf-macs.el,
Colin Walters <=