[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx c8688c04e9 1/2: Fix jinx-repeat-map, document navi
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/jinx c8688c04e9 1/2: Fix jinx-repeat-map, document navigation in README |
|
Date: |
Mon, 1 May 2023 13:02:44 -0400 (EDT) |
branch: externals/jinx
commit c8688c04e98bed59a459b90203d58b4b183577de
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Fix jinx-repeat-map, document navigation in README
---
README.org | 18 ++++++++++++++++--
jinx.el | 3 ++-
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/README.org b/README.org
index 0d664ccc6e..894b085510 100644
--- a/README.org
+++ b/README.org
@@ -86,7 +86,7 @@ A sample configuration with the popular =use-package= macro
is shown here:
:bind ([remap ispell-word] . jinx-correct))
#+end_src
-* Correcting words
+* Correcting misspellings
After invoking the command =jinx-correct=, suggested corrections are displayed
as
a completion menu. You can press digit keys to quickly select a suggestion.
@@ -94,7 +94,8 @@ Furthermore the menu offers options to save the word
temporarily for the current
session, in the personal dictionary or in the file-local variables. Note that
you can enter arbitrary input at the correction prompt in order to make the
correction. The keys =M-n= (=M-p=) are bound to =jinx-next= and
=jinx-previous= and
-allow you to move the next (previous) misspelling.
+allow you to move the next (previous) misspelling from inside the
=jinx-correct=
+prompt.
The completion menu is compatible with all popular completion UIs: Vertico,
Mct,
Icomplete, Ivy, Helm and of course default completion. In case you use Vertico
I
@@ -108,6 +109,19 @@ more suggestions fit on the screen.
(vertico-multiform-mode 1)
#+end_src
+* Navigating between misspellings
+
+As mentioned before, when correcting a word with =jinx-correct=, the movement
+commands =jinx-next= and =jinx-previous= are available on the keys =M-n= and
=M-p= to
+navigate to the next and previous misspelling respectively.
+
+These commands can also be used outside the minibuffer context. While the
+commands are not bound globally by default, they are available as =M-n= and
=M-p= if
+point is placed on top of a misspelled word overlay. If you want you can also
+bind them in the =jinx-mode-map=, such that they are always available
independent
+of point placement. If =repeat-mode= from Emacs 28 is enabled, the movement
can be
+repeated with the keys =n= and =p=.
+
* Enchant backends and personal dictionaries
Enchant uses different backends for different languages. The backends are
diff --git a/jinx.el b/jinx.el
index 93fea6fdd4..1d56d3ba58 100644
--- a/jinx.el
+++ b/jinx.el
@@ -209,7 +209,7 @@ checking."
(defvar-keymap jinx-repeat-map
:doc "Repeat keymap for navigation commands."
- :repeat (:enter (jinx-next jinx-previous))
+ :repeat (:exit (jinx-correct))
"M-n" #'jinx-next
"M-p" #'jinx-previous
"n" #'jinx-next
@@ -816,6 +816,7 @@ If prefix argument ALL non-nil correct all misspellings."
(interactive "*P")
(unless jinx-mode (jinx-mode 1))
(cl-letf (((symbol-function #'jinx--timer-handler) #'ignore) ;; Inhibit
+ (repeat-mode nil) ;; No repeating of jinx-next and jinx-previous
(old-point (and (not all) (point-marker))))
(unwind-protect
(let* ((overlays