changeset 43767:6bc5cbc8912d

(define-ibuffer-column): Add :summarizer property.
author Colin Walters <walters@gnu.org>
date Fri, 08 Mar 2002 04:03:36 +0000
parents 4ec731903020
children 643faa52276e
files lisp/ibuf-macs.el
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuf-macs.el	Fri Mar 08 04:03:21 2002 +0000
+++ b/lisp/ibuf-macs.el	Fri Mar 08 04:03:36 2002 +0000
@@ -93,14 +93,8 @@
 `ibuffer-recompile-formats'."
   (let* ((sym (intern (concat "ibuffer-make-column-"
 			      (symbol-name symbol))))
-	 (bod-2 `(with-current-buffer buffer
+	 (bod-1 `(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
@@ -116,12 +110,13 @@
 		 name
 	       (capitalize (symbol-name symbol))))
        ,(if summarizer
+	    ;; Store the name of the summarizing function.
 	    `(put (quote ,sym) 'ibuffer-column-summarizer
 		  (quote ,summarizer)))
        ,(if summarizer
-	    `(defvar ,(intern (format "ibuffer-summary-for-column-%s"
-				      name))
-	       nil))
+	    ;; This will store the actual values of the column
+	    ;; summary.
+	    `(put (quote ,sym) 'ibuffer-column-summary nil))
        :autoload-end)))
 ;; (put 'define-ibuffer-column 'lisp-indent-function 'defun)