Function: doom-modeline--buffer-name
doom-modeline--buffer-name is a byte-compiled function defined in
doom-modeline-segments.el.
Signature
(doom-modeline--buffer-name)
Documentation
The current buffer name.
Source Code
;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-segments.el
(defsubst doom-modeline--buffer-name ()
"The current buffer name."
(when doom-modeline-buffer-name
(if (and (not (eq doom-modeline-buffer-file-name-style 'file-name))
doom-modeline--limited-width-p)
;; Only display the buffer name if the window is small, and doesn't
;; need to respect file-name style.
(doom-modeline--buffer-simple-name)
(when-let* ((name (or doom-modeline--buffer-file-name
(doom-modeline-update-buffer-file-name))))
;; Check if the buffer is modified
(if (and doom-modeline-highlight-modified-buffer-name
(buffer-modified-p))
(propertize name 'face (doom-modeline-face 'doom-modeline-buffer-modified))
(doom-modeline-display-text name))))))