aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters2002-03-08 04:03:36 +0000
committerColin Walters2002-03-08 04:03:36 +0000
commitceb449353ba812ccf3be57c6ab8bf54ab01b121c (patch)
treeb1b40029bb763e5af1a5ea4ce70f3ba74dc1210b
parent2ef3551dfdc464e69619e3d75ed5563bb8984c9d (diff)
downloademacs-ceb449353ba812ccf3be57c6ab8bf54ab01b121c.tar.gz
emacs-ceb449353ba812ccf3be57c6ab8bf54ab01b121c.zip
(define-ibuffer-column): Add :summarizer property.
-rw-r--r--lisp/ibuf-macs.el15
1 files changed, 5 insertions, 10 deletions
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index 6ef83594e0c..23b5e18fed4 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -93,14 +93,8 @@ change its definition, you should explicitly call
93`ibuffer-recompile-formats'." 93`ibuffer-recompile-formats'."
94 (let* ((sym (intern (concat "ibuffer-make-column-" 94 (let* ((sym (intern (concat "ibuffer-make-column-"
95 (symbol-name symbol)))) 95 (symbol-name symbol))))
96 (bod-2 `(with-current-buffer buffer 96 (bod-1 `(with-current-buffer buffer
97 ,@body)) 97 ,@body))
98 (bod-1 (if summarizer
99 `(car
100 (push ,bod-2
101 ,(intern (format "ibuffer-summary-for-column-%s"
102 name))))
103 bod-2))
104 (bod (if props 98 (bod (if props
105 `(propertize 99 `(propertize
106 ,bod-1 100 ,bod-1
@@ -116,12 +110,13 @@ change its definition, you should explicitly call
116 name 110 name
117 (capitalize (symbol-name symbol)))) 111 (capitalize (symbol-name symbol))))
118 ,(if summarizer 112 ,(if summarizer
113 ;; Store the name of the summarizing function.
119 `(put (quote ,sym) 'ibuffer-column-summarizer 114 `(put (quote ,sym) 'ibuffer-column-summarizer
120 (quote ,summarizer))) 115 (quote ,summarizer)))
121 ,(if summarizer 116 ,(if summarizer
122 `(defvar ,(intern (format "ibuffer-summary-for-column-%s" 117 ;; This will store the actual values of the column
123 name)) 118 ;; summary.
124 nil)) 119 `(put (quote ,sym) 'ibuffer-column-summary nil))
125 :autoload-end))) 120 :autoload-end)))
126;; (put 'define-ibuffer-column 'lisp-indent-function 'defun) 121;; (put 'define-ibuffer-column 'lisp-indent-function 'defun)
127 122