mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
ui/modeline: unset other format hooks
If set-modeline-hook! is used after init.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user