Move :tools fly{check,spell} to :checkers {syntax,spell}

These modules were renamed so we can later generalize their
implementations, such as adding flymake support to the syntax checker.
This commit is contained in:
Henrik Lissner 2020-01-09 18:41:48 -05:00
parent a680a4c96d
commit b89992624b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
12 changed files with 83 additions and 72 deletions

View file

@ -0,0 +1,27 @@
;;; checkers/spell/autoload.el -*- lexical-binding: t; -*-
;;;###autodef
(defalias 'flyspell-mode! #'flyspell-mode)
(defvar +spell--flyspell-predicate-alist nil
"TODO")
;;;###autodef
(defun set-flyspell-predicate! (modes predicate)
"TODO"
(declare (indent defun))
(dolist (mode (doom-enlist modes) +spell--flyspell-predicate-alist)
(add-to-list '+spell--flyspell-predicate-alist (cons mode predicate))))
;;;###autoload
(defun +spell-init-flyspell-predicate-h ()
"TODO"
(when-let (pred (assq major-mode +spell--flyspell-predicate-alist))
(setq-local flyspell-generic-check-word-predicate (cdr pred))))
;;;###autoload
(defun +spell-correction-at-point-p (&optional point)
"TODO"
(cl-loop for ov in (overlays-at (or point (point)))
if (overlay-get ov 'flyspell-overlay)
return t))