Function: doom-modeline-segment--spell

doom-modeline-segment--spell is a natively compiled function defined in doom-modeline-segments.el.

Signature

(doom-modeline-segment--spell)

Documentation

spell modeline segment

Source Code

;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-segments.el
;;
;; Spell
;;

(doom-modeline-def-segment spell
  (when (and doom-modeline-spell
             (bound-and-true-p flyspell-mode))
    (let ((sep (doom-modeline-spc))
          (vsep (doom-modeline-vspc))
          (face (doom-modeline-face 'doom-modeline-spell)))
      (propertize
       (concat
        sep
        (doom-modeline-icon 'mdicon "nf-md-spellcheck" "🖉"
                            flyspell-mode-line-string
                            :face face)
        vsep
        (propertize (substring (or ispell-local-dictionary
                                               ispell-dictionary
                                   "--")
                               0 2)
                    'face face)
        sep)
       'help-echo "mouse-1: Change dictionary
mouse-2: Show help for minor mode"
       'mouse-face 'doom-modeline-highlight
       'local-map (let ((map (make-sparse-keymap)))
                    (define-key map [mode-line mouse-1]
                      #'ispell-change-dictionary)
                    (define-key map [mode-line mouse-2]
                      (lambda ()
                        (interactive)
                        (describe-function 'flyspell-mode)))
                    map)))))