[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx 0f62c68620 8/9: Improve jinx-correct-at-point
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jinx 0f62c68620 8/9: Improve jinx-correct-at-point |
Date: |
Mon, 11 Sep 2023 12:58:18 -0400 (EDT) |
branch: externals/jinx
commit 0f62c686204eef0a2435a68f6912d6c62dd68dc5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Improve jinx-correct-at-point
---
CHANGELOG.org | 4 +++-
README.org | 11 ++++++-----
jinx.el | 5 +++--
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index ba2822366b..2936f5ff04 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -9,7 +9,9 @@
- Replace =jinx-excluded-modes= with =global-jinx-modes=, the Emacs 28
convention
for globalized minor modes.
- =jinx-correct=: Offer session words as suggestions.
-- Add =jinx-correct-nearest=, =jinx-correct-all= and =jinx-correct-at-point=
commands. The command =jinx-correct= dispatches to one of those commands
depending on the prefix argument.
+- Add =jinx-correct-nearest=, =jinx-correct-all= and =jinx-correct-at-point=
commands.
+ The command =jinx-correct= dispatches to one of those commands depending on
the
+ prefix argument.
* Version 0.9 (2023-07-02)
diff --git a/README.org b/README.org
index 6949cb8d76..1d32893ecf 100644
--- a/README.org
+++ b/README.org
@@ -68,10 +68,10 @@ command, =jinx-mode=, for activating for specific modes.
(add-hook hook #'jinx-mode))
#+end_src
-The commands =jinx-correct= and =jinx-languages= are autoloaded. Invoking
-=jinx-correct= corrects the misspellings. Binding =jinx-correct= to =M-$= takes
-over that key from the default assignment to =ispell-word=. Since Jinx is
-independent of the Ispell package, =M-$= can be re-used.
+The commands =jinx-correct= and =jinx-languages= are marked as autoloads.
Invoking
+=jinx-correct= corrects the misspellings. Binding =jinx-correct= to =M-$=
takes over
+that key from the default assignment to =ispell-word=. Since Jinx is
independent
+of the Ispell package, =M-$= can be re-used.
#+begin_src emacs-lisp
(keymap-global-set "M-$" #'jinx-correct)
@@ -80,7 +80,8 @@ independent of the Ispell package, =M-$= can be re-used.
- =M-$= triggers correction for the misspelled word before point.
- =C-u M-$= triggers correction for the entire buffer.
-- =C-u C-u M-$= forces correction of the word at point, even if it is not
misspelled.
+- =C-u C-u M-$= forces correction of the word at point, even if it is not
+ misspelled.
A sample configuration with the popular =use-package= macro is shown here:
diff --git a/jinx.el b/jinx.el
index 764cf7e293..face42aa59 100644
--- a/jinx.el
+++ b/jinx.el
@@ -903,8 +903,9 @@ Suggest corrections even if the word is not misspelled."
(jinx--correct-guard
(while (when-let ((skip (jinx--correct-overlay (make-overlay beg end)
nil)))
(forward-to-word skip)
- (setf (cons beg end) (jinx--bounds-of-word))
- beg)))))
+ (when-let ((bounds (jinx--bounds-of-word)))
+ (setf (cons beg end) bounds))
+ t)))))
;;;###autoload
(defun jinx-correct (&optional arg)
- [elpa] externals/jinx updated (417d95002f -> 6f09016ea0), ELPA Syncer, 2023/09/11
- [elpa] externals/jinx 3f3c07b753 3/9: jinx-correct: Add dispatching to jinx-correct-at-point, ELPA Syncer, 2023/09/11
- [elpa] externals/jinx ccf8b6b255 4/9: Code cleanup, use save-excursion, ELPA Syncer, 2023/09/11
- [elpa] externals/jinx e70214849f 5/9: Update README.org, ELPA Syncer, 2023/09/11
- [elpa] externals/jinx bf7d9f5144 1/9: Implement jinx-correct-at-point by faking an overlay (#89), ELPA Syncer, 2023/09/11
- [elpa] externals/jinx c891a7779f 7/9: Update CHANGELOG.org, ELPA Syncer, 2023/09/11
- [elpa] externals/jinx 0f62c68620 8/9: Improve jinx-correct-at-point,
ELPA Syncer <=
- [elpa] externals/jinx 6f09016ea0 9/9: jinx-correct-*: Code cleanup, ELPA Syncer, 2023/09/11
- [elpa] externals/jinx 709d4fa387 6/9: Update CHANGELOG.org, ELPA Syncer, 2023/09/11
- [elpa] externals/jinx 5702e733eb 2/9: Refactoring, ELPA Syncer, 2023/09/11