Function: ibuffer-update-title-and-summary
ibuffer-update-title-and-summary is a byte-compiled function defined
in ibuffer.el.gz.
Signature
(ibuffer-update-title-and-summary FORMAT)
Source Code
;; Defined in /usr/src/emacs/lisp/ibuffer.el.gz
(defun ibuffer-update-title-and-summary (format)
(ibuffer-assert-ibuffer-mode)
;; Don't do funky font-lock stuff here
(let ((inhibit-modification-hooks t))
;; Insert the title names.
(if (eq ibuffer-use-header-line 'title)
(setq header-line-format
`("" header-line-indent
,(propertize " " 'display
'(space :align-to header-line-indent-width))
,@(mapcar (lambda (e) (ibuffer--format-title e t)) format)))
(if (get-text-property (point-min) 'ibuffer-title)
(delete-region (point-min)
(next-single-property-change
(point-min) 'ibuffer-title)))
(goto-char (point-min))
(add-text-properties
(point)
(progn
(let ((opos (point)))
(apply #'insert (mapcar #'ibuffer--format-title format))
(add-text-properties opos (point) '(ibuffer-title-header t))
(insert "\n")
;; Add the underlines
(let ((str (save-excursion
(forward-line -1)
(beginning-of-line)
(buffer-substring (point) (line-end-position)))))
(apply #'insert (mapcar
(lambda (c)
(if (not (or (eq c ?\s)
(eq c ?\n)))
?-
?\s))
str)))
(insert "\n"))
(point))
`(ibuffer-title t font-lock-face ,ibuffer-title-face)))
;; Now, insert the summary columns.
(goto-char (point-max))
(if (and (> (point-max) (point-min))
(get-text-property (1- (point-max)) 'ibuffer-summary))
(delete-region (previous-single-property-change
(point-max) 'ibuffer-summary)
(point-max)))
(if ibuffer-display-summary
(add-text-properties
(point)
(progn
(insert "\n")
(apply #'insert (mapcar #'ibuffer--format-summary format))
(point))
'(ibuffer-summary t)))))