Commit Graph

27 Commits

Author SHA1 Message Date
a31dced7bc Requested changes -- move defvar to preface
We can now remove the redundant hack.
2020-11-13 20:51:54 +01:00
ea16bb66c3 Fix behaviour without aspell
If aspell (or a spell-fu acceptable equivalent) warn the user. If it
failed to bind +spell-correct-interface, and bind that.

Remove previous hack. It prevents use of +spell/correct if spell-fu does
not try to highlight a word. This is extreamly common is docstrings, for
example. I think having +spell/correct should check any word it is
called upon, even without general text highlighting.
2020-11-13 15:37:20 +01:00
77646c5f42 Merge pull request #3994 from akirabaruah/fix-ispell-default-dict
checkers/spell: fix default ispell dict
2020-10-08 14:01:04 -04:00
426e3c6aa6 Merge pull request #3920 from asymmetric/aspell-tex-config
modules/checkers/spell: remove tex option
2020-10-05 21:04:12 -04:00
4d42347032 Merge pull request #3841 from Ban3/enchant-spell
checkers/spell: add support for using enchant
2020-10-04 20:24:57 -04:00
289369f191 checkers/spell: fix default ispell dict
Changes the default ispell dictionary from "en" to "english" since the
former isn't actually a default dictionary name listed in ispell. See
9f30a6b1a4/lisp/textmodes/ispell.el (L471)

Otherwise, enabling checkers/spell doesn't do anything even if aspell and the
aspell-en dictionary are installed according to the module README file.
2020-09-29 01:19:31 -07:00
021a2d3c64 modules/checkers/spell: remove tex option
It causes aspell 0.60.8 to fail with message `the key "check-tex-comments" is unknown`.
2020-09-09 23:04:38 +02:00
79c1fcefcf Fix #3863: "load" ispell after flyspell
Emacs loads both ispell and flyspell at startup, so to lazy load user
configuration to either package, we fool Emacs into thinking neither is
loaded yet.

However, this means we need a trigger to eventually "load" ispell, which
we didn't have until now, causing #3863.
2020-08-31 23:19:31 -04:00
518c97a2ac Rename {if,when}! -> eval-{if,when}!
To better represent its purpose, as extensions to Emacs' eval-when*
API (for control flow at compile time).
2020-08-27 01:10:08 -04:00
1a3326be53 checkers/spell: add support for using enchant 2020-08-26 13:57:06 +03:00
c0a3c6f977 Add latex faces to +spell-excluded-faces-alist 2020-08-24 16:16:19 +03:00
e3750dbf66 checkers/spell: add +flyspell flag
spell-fu lacks support for multiple dictionaries, affix expansion, and
many non-English dictionaries, so I've added back flyspell support to
the spell module, but opt-in, because it is still the significantly
slower option and spell-fu may support them one day.

If not, tlikonen/wcheck-mode is another alternative to consider.

Fixes #3813
2020-08-23 18:48:50 -04:00
c497cdabc7 checkers/spell: fix z=, zq, zw & personal dictionary
+ Fixes ispell not noticing allowed words in your personal dictionary.
  So +spell/correct would sometimes correct words that spell-fu wasn't
  highlighting as incorrect, and sometimes wouldn't correct words that
  were.
+ Fixes spell-fu refusing to read or write to the personal dictionary if
  the file didn't already exist beforehand (for zq and zw).
+ Change ispell-dictionary fallback from "en_US" (which aspell won't
  always recognize) to "en".
+ Moved ispell-personal-dictionary to ~/.emacs.d/.local/etc/ispell/ by
  default.
2020-08-23 02:32:58 -04:00
d393d3e0cd checkers/spell: add doctor.el; no-op without aspell
Aspell is a hard dependency of this module, even if you use hunspell as
a backend. The spellchecker will simply bow out if aspell isn't present
on your system at startup.
2020-08-21 22:01:50 -04:00
ff9c1ace22 checkers/spell: replace flyspell with spell-fu
Spell-fu is significantly faster, but does produce more false
positives (more faces must be added to spell-fu-faces-exclude to reduce
these).

Unfortunately, there is no fancy "correction" interface for spell-fu
yet, so we'll have to resort to ispell-word (on z=) for now.
2020-08-21 18:57:10 -04:00
7ecda0d8e7 checkers/spell: fix end-of-file error
Closes #3300
2020-06-05 04:05:29 -04:00
5b8b04f0c8 Properly lazy load flyspell
Package was eagerly loaded at startup, so we must pretend it hasn't to
defer it and future configuration.

And generalize defer-feature! macro.
2020-06-05 01:41:49 -04:00
8bf902d5f4 General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
46c1f7a7b4 Fix #3282: activate flyspell-lazy-mode 2020-06-02 23:18:01 -04:00
00ddb2eba6 Only rebind ispell-word if flyspell-correct is enabled
flyspell-correct-at-point is not defined unless the the spell module is
enabled.
2020-05-16 22:33:33 -06:00
169f9a6121 General, minor refactor & reformatting 2020-03-27 01:25:30 -04:00
7f6876d85b Enable flyspell in git-commit-mode 2020-02-13 18:09:09 +08:00
ef472d7c1a Add flyspell-lazy package
To hopefully speed up flyspell.
2020-02-08 20:43:29 -05:00
b2e6a069f0 Move an aspell specific argument to appropriate block 2020-01-23 10:52:44 +00:00
206d0d9d92 Prevent flycheck-correct if region/insert mode is active 2020-01-20 22:23:40 -05:00
fb24a8deec Activate flyspell-mode in specific modes
yaml-mode is derived from text-mode, rather than prog or conf-mode. This
may be true for other major modes, so we must be more judicious about
where we activate flyspell-mode.
2020-01-20 19:31:35 -05:00
b89992624b 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.
2020-01-09 22:56:26 -05:00