Function: speedbar-set-mode-line-format
speedbar-set-mode-line-format is a byte-compiled function defined in
speedbar.el.gz.
Signature
(speedbar-set-mode-line-format)
Documentation
Set the format of the mode line based on the current speedbar environment.
This gives visual indications of what is up. It EXPECTS the speedbar frame and window to be the currently active frame and window.
Source Code
;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-set-mode-line-format ()
"Set the format of the mode line based on the current speedbar environment.
This gives visual indications of what is up. It EXPECTS the speedbar
frame and window to be the currently active frame and window."
(if (and (frame-live-p (speedbar-current-frame))
speedbar-buffer)
(with-current-buffer speedbar-buffer
(let* ((w (or (speedbar-frame-width) 20))
(p1 "<<")
(p5 ">>")
(p3 (if speedbar-update-flag "#" "!"))
(p35 (capitalize speedbar-initial-expansion-list-name))
(blank (- w (length p1) (length p3) (length p5) (length p35)
(if line-number-mode 5 1)))
(p2 (if (> blank 0)
(make-string (/ blank 2) ? )
""))
(p4 (if (> blank 0)
(make-string (+ (/ blank 2) (% blank 2)) ? )
""))
(tf
(if line-number-mode
(list (concat p1 p2 p3 " " p35) '(line-number-mode " %3l")
(concat p4 p5))
(list (concat p1 p2 p3 p4 p5)))))
(if (not (equal mode-line-format tf))
(progn
(setq mode-line-format tf)
(force-mode-line-update)))))))