Default modeline segments to :init
Fixes buffer-id in non-file-visiting buffers.
This commit is contained in:
parent
65f0dcef54
commit
0cdb736670
2 changed files with 2 additions and 1 deletions
|
@ -79,7 +79,7 @@ keep them left and right aligned respectively."
|
|||
(if (eq realvar name)
|
||||
`((defvar-local ,name nil ,docstring)
|
||||
(setq-default ,name ,init))
|
||||
`((defvar-local ,realvar nil)
|
||||
`((defvar-local ,realvar ,init)
|
||||
(defvar-local ,name nil ,docstring)
|
||||
(setq-default
|
||||
,name '(:eval (cond ((active) ,realvar)
|
||||
|
|
|
@ -291,6 +291,7 @@ buffers.")
|
|||
|
||||
(def-modeline-segment! +modeline-buffer-id
|
||||
:on-hooks (find-file-hook after-save-hook after-revert-hook)
|
||||
:init "%b"
|
||||
:faces t
|
||||
(if buffer-file-name
|
||||
(funcall +modeline-buffer-path-function buffer-file-name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue