Function: markdown-flyspell-check-word-p

markdown-flyspell-check-word-p is a byte-compiled function defined in markdown-mode.el.

Signature

(markdown-flyspell-check-word-p)

Documentation

Return t if flyspell should check word just before point.

Used for flyspell-generic-check-word-predicate.

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-flyspell-check-word-p ()
  "Return t if `flyspell' should check word just before point.
Used for `flyspell-generic-check-word-predicate'."
  (save-excursion
    (goto-char (1- (point)))
    ;; https://github.com/jrblevin/markdown-mode/issues/560
    ;; enable spell check YAML meta data
    (if (or (and (markdown-code-block-at-point-p)
                 (not (markdown-text-property-at-point 'markdown-yaml-metadata-section)))
            (markdown-inline-code-at-point-p)
            (markdown-in-comment-p)
            (markdown--face-p (point) '(markdown-reference-face
                                        markdown-markup-face
                                        markdown-plain-url-face
                                        markdown-inline-code-face
                                        markdown-url-face))
            (markdown--pandoc-reference-p))
        (prog1 nil
          ;; If flyspell overlay is put, then remove it
          (let ((bounds (bounds-of-thing-at-point 'word)))
            (when bounds
              (cl-loop for ov in (overlays-in (car bounds) (cdr bounds))
                       when (overlay-get ov 'flyspell-overlay)
                       do
                       (delete-overlay ov)))))
      t)))