mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 10:50:49 -08:00
(define-ibuffer-column): Add :summarizer property.
This commit is contained in:
parent
2ef3551dfd
commit
ceb449353b
1 changed files with 5 additions and 10 deletions
|
|
@ -93,14 +93,8 @@ change its definition, you should explicitly call
|
||||||
`ibuffer-recompile-formats'."
|
`ibuffer-recompile-formats'."
|
||||||
(let* ((sym (intern (concat "ibuffer-make-column-"
|
(let* ((sym (intern (concat "ibuffer-make-column-"
|
||||||
(symbol-name symbol))))
|
(symbol-name symbol))))
|
||||||
(bod-2 `(with-current-buffer buffer
|
(bod-1 `(with-current-buffer buffer
|
||||||
,@body))
|
,@body))
|
||||||
(bod-1 (if summarizer
|
|
||||||
`(car
|
|
||||||
(push ,bod-2
|
|
||||||
,(intern (format "ibuffer-summary-for-column-%s"
|
|
||||||
name))))
|
|
||||||
bod-2))
|
|
||||||
(bod (if props
|
(bod (if props
|
||||||
`(propertize
|
`(propertize
|
||||||
,bod-1
|
,bod-1
|
||||||
|
|
@ -116,12 +110,13 @@ change its definition, you should explicitly call
|
||||||
name
|
name
|
||||||
(capitalize (symbol-name symbol))))
|
(capitalize (symbol-name symbol))))
|
||||||
,(if summarizer
|
,(if summarizer
|
||||||
|
;; Store the name of the summarizing function.
|
||||||
`(put (quote ,sym) 'ibuffer-column-summarizer
|
`(put (quote ,sym) 'ibuffer-column-summarizer
|
||||||
(quote ,summarizer)))
|
(quote ,summarizer)))
|
||||||
,(if summarizer
|
,(if summarizer
|
||||||
`(defvar ,(intern (format "ibuffer-summary-for-column-%s"
|
;; This will store the actual values of the column
|
||||||
name))
|
;; summary.
|
||||||
nil))
|
`(put (quote ,sym) 'ibuffer-column-summary nil))
|
||||||
:autoload-end)))
|
:autoload-end)))
|
||||||
;; (put 'define-ibuffer-column 'lisp-indent-function 'defun)
|
;; (put 'define-ibuffer-column 'lisp-indent-function 'defun)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue