 (defsubst active ()
   (eq (selected-window) +doom-modeline-current-window))
 
-;; From from `powerline's `pl/make-xpm'.
+;; Inspired from `powerline's `pl/make-xpm'.
 (def-memoized! +doom-modeline--make-xpm (color height width)
   "Create an XPM bitmap."
   (when (display-graphic-p)


(def-modeline-segment! vcs
  "Displays the current branch, colored based on its state."
  (when (and vc-mode buffer-file-name)
    (let ((backend (vc-backend buffer-file-name))
          (state   (vc-state buffer-file-name))
          (face    'mode-line-inactive)

(def-package! eldoc-eval :demand t
  :config
  ;; Show eldoc in the mode-line with `eval-expression'
  (defun +doom-modeline--show-eldoc (input)
    "Display string STR in the mode-line next to minibuffer."
    (with-current-buffer (eldoc-current-buffer)
      (let* ((str              (and (stringp input) input))
             (mode-line-format (or (and str (doom-modeline 'eldoc))
                                   mode-line-format))
             mode-line-in-non-selected-windows)
        (force-mode-line-update)
        (sit-for eldoc-show-in-mode-line-delay))))

  (setq eldoc-in-minibuffer-show-fn '+doom-modeline--show-eldoc)
  (eldoc-in-minibuffer-mode +1))

