* mood-line.el: Fixed checks for meow and evil-segments

Should no longer get warnings for unbound variables. Also, added
a missing comment.
This commit is contained in:
Trevor Richards 2022-07-30 07:41:33 -07:00
parent 214263c0fc
commit 7a8f3ccee3
No known key found for this signature in database
GPG Key ID: 8546CF84A13DD5EF

View File

@ -337,12 +337,13 @@ The `Face' may be either a face symbol or a property list of key-value pairs
(defun mood-line-segment-evil ()
"Display the current evil-mode state."
(when evil-state
(when (boundp 'evil-state)
(let ((mode-cons (alist-get evil-state mood-line-evil-state-alist)))
(concat (propertize (car mode-cons) 'face (cdr mode-cons)) " "))))
(defun mood-line-segment-meow ()
(when meow--current-state
"Display the current meow-mode state."
(when (boundp 'meow--current-state)
(let ((mode-cons (alist-get
meow--current-state
mood-line-meow-state-alist)))