ui/modeline: unset other format hooks
If set-modeline-hook! is used after init.
This commit is contained in:
parent
980fa74630
commit
9c73bff4f0
1 changed files with 4 additions and 1 deletions
|
@ -144,7 +144,10 @@ If DEFAULT is non-nil, apply to all future buffers. Modelines are defined with
|
|||
See `def-modeline!' on how modelines are defined."
|
||||
(let ((fn (intern (format "+modeline-set-%s-format-h" name))))
|
||||
(dolist (hook (doom-enlist hooks))
|
||||
(add-hook hook fn 'append))))
|
||||
(when after-init-time
|
||||
(dolist (name (mapcar #'car +modeline-format-alist))
|
||||
(remove-hook hook (intern (format "+modeline-set-%s-format-h" name)))))
|
||||
(add-hook hook fn))))
|
||||
|
||||
(defmacro def-modeline! (name lhs rhs)
|
||||
"Define a modeline format by NAME.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue