# HG changeset patch # User John Paul Wallington # Date 1053282292 0 # Node ID 9765d874366d3b244874dd600101c7938ebdb9a4 # Parent c088bf2c1f13f2d58cd4e9e33568d2fec8ca958e (ibuffer-display-summary): New customizable variable. (ibuffer-update-title-and-summary): Respect it. diff -r c088bf2c1f13 -r 9765d874366d lisp/ibuffer.el --- a/lisp/ibuffer.el Sun May 18 17:19:59 2003 +0000 +++ b/lisp/ibuffer.el Sun May 18 18:24:52 2003 +0000 @@ -157,6 +157,11 @@ :group 'ibuffer) (defvar ibuffer-shrink-to-minimum-size nil) +(defcustom ibuffer-display-summary t + "If non-nil, summarize Ibuffer columns." + :type 'boolean + :group 'ibuffer) + (defcustom ibuffer-truncate-lines t "If non-nil, do not display continuation lines." :type 'boolean @@ -1926,34 +1931,35 @@ (delete-region (previous-single-property-change (point-max) 'ibuffer-summary) (point-max))) - (add-text-properties - (point) - (progn - (insert "\n") - (dolist (element format) - (insert - (if (stringp element) - (make-string (length element) ? ) - (let ((sym (car element))) - (let ((min (cadr element)) - ;; (max (caddr element)) - (align (cadddr element))) - ;; Ignore a negative min when we're inserting the title - (when (minusp min) - (setq min (- min))) - (let* ((summary (if (get sym 'ibuffer-column-summarizer) - (funcall (get sym 'ibuffer-column-summarizer) - (get sym 'ibuffer-column-summary)) - (make-string (length (get sym 'ibuffer-column-name)) - ? ))) - (len (length summary))) - (if (< len min) - (ibuffer-format-column summary - (- min len) - align) - summary))))))) - (point)) - `(ibuffer-summary t)))) + (if ibuffer-display-summary + (add-text-properties + (point) + (progn + (insert "\n") + (dolist (element format) + (insert + (if (stringp element) + (make-string (length element) ? ) + (let ((sym (car element))) + (let ((min (cadr element)) + ;; (max (caddr element)) + (align (cadddr element))) + ;; Ignore a negative min when we're inserting the title + (when (minusp min) + (setq min (- min))) + (let* ((summary (if (get sym 'ibuffer-column-summarizer) + (funcall (get sym 'ibuffer-column-summarizer) + (get sym 'ibuffer-column-summary)) + (make-string (length (get sym 'ibuffer-column-name)) + ? ))) + (len (length summary))) + (if (< len min) + (ibuffer-format-column summary + (- min len) + align) + summary))))))) + (point)) + `(ibuffer-summary t))))) (defun ibuffer-update-mode-name () (setq mode-name (format "Ibuffer by %s" (if ibuffer-sorting-mode