Function: project-mode-line-format
project-mode-line-format is a byte-compiled function defined in
project.el.gz.
Signature
(project-mode-line-format)
Documentation
Compose the project mode-line.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(defun project-mode-line-format ()
"Compose the project mode-line."
(when-let ((project (project-current)))
;; Preserve the global value of 'last-coding-system-used'
;; that 'write-region' needs to set for 'basic-save-buffer',
;; but updating the mode line might occur at the same time
;; during saving the buffer and 'project-name' can change
;; 'last-coding-system-used' when reading the project name
;; from .dir-locals.el also enables flyspell-mode (bug#66825).
(let ((last-coding-system-used last-coding-system-used))
(concat
" "
(propertize
(project-name project)
'face project-mode-line-face
'mouse-face 'mode-line-highlight
'help-echo "mouse-1: Project menu"
'local-map project-mode-line-map)))))