Commit Graph

40 Commits

Author SHA1 Message Date
TEC
9e0c188b5c tweak(spell): ignore org-inline-src-block
Also fix the alphabetic sorting of org-cite while I'm at it.
2022-05-27 03:00:45 +02:00
b7841e3659 fix(spell): disable flyspell-lazy in message-mode
Without this, flyspell is never started in these buffer (e.g. when
composing mail w/ Notmuch).

Fix: #3357
2022-02-10 21:07:20 +01:00
b37d8481ce tweak(spell): remove RET keybind for +spell/correct
z= and M-$ are available. RET on arbitrary misspellings make DWIM
commands in text modes unpredictable, like org and markdown.
2022-01-03 16:51:51 +01:00
3d28ecf07a feat(spell): don't spellcheck in org citations 2021-11-25 01:22:57 +01:00
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
a3e01fb4fe fix(org): no mixed-pitch/spellcheck on org-footnote 2021-07-28 14:00:02 -04:00
24eaa1317c completion/selectrum -> completion/vertico, part 2
- Rename module from `:completion selectrum` to `:completion vertico`
- Rename all files involved
- Do *not* yet rename all the functions, as that messes up git's rename
  detection.
2021-07-25 02:51:15 +03:00
8e6371760a selectrum: add spellcheck support 2021-07-25 02:49:41 +03:00
9d6a4971d3 Don't spell check in markdown urls/code 2021-05-29 11:59:19 -04:00
699e18b7f1 Fix excluded faces being spell-fu checked anyway
Due to spell-fu--faces-at-point conducting face detection that doesn't
penetrate overlays. This should be PRed/reported upstream at some point.
2021-03-27 22:06:49 -04:00
fc955f4100 Don't set a default ispell-dictionary
May address #4420, #4422, and/or #4407
2020-12-13 00:21:05 -05:00
930524f3ac Apply spell-fu blacklist to derived modes 2020-12-12 23:23:13 -05:00
d149c59d2e Add emacs mode checks to insert mode checks
This is to accommodate users who default to emacs mode, rather than
insert mode. The two are also very alike, so many of these checks should
apply to both (almost) equally.
2020-12-11 17:38:09 -05:00
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