Don't set mode-line if format doesn't exist
This commit is contained in:
parent
0cd32b5f1d
commit
ba4d72713a
1 changed files with 7 additions and 6 deletions
|
@ -209,12 +209,13 @@
|
||||||
|
|
||||||
(defun set-modeline! (name &optional default)
|
(defun set-modeline! (name &optional default)
|
||||||
(let ((modeline (cdr (assq name doom-mode-line-alist))))
|
(let ((modeline (cdr (assq name doom-mode-line-alist))))
|
||||||
(if default
|
(when modeline
|
||||||
(setq-default mode-line-format-left `("" ,@(car modeline))
|
(if default
|
||||||
mode-line-format-right `("" ,@(cadr modeline)))
|
(setq-default mode-line-format-left `("" ,@(car modeline))
|
||||||
(setq mode-line-format-left `("" ,@(car modeline))
|
mode-line-format-right `("" ,@(cadr modeline)))
|
||||||
mode-line-format-right `("" ,@(cadr modeline))))
|
(setq mode-line-format-left `("" ,@(car modeline))
|
||||||
(force-mode-line-update)))
|
mode-line-format-right `("" ,@(cadr modeline))))
|
||||||
|
(force-mode-line-update))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue