[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5e63841: Fix flyspell-check-previous-highlighted-wo
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 5e63841: Fix flyspell-check-previous-highlighted-word |
Date: |
Sat, 25 Jul 2015 09:36:48 +0000 |
branch: master
commit 5e63841f2847b0b07cf15aed98c26fe914e9804a
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix flyspell-check-previous-highlighted-word
* lisp/textmodes/flyspell.el
(flyspell-check-previous-highlighted-word): Really accept a
numeric argument, as the doc string describes. Fix an off-by-one
error in looking up overlays, so invocation with point immediately
after a word would check that word. Clarify the doc string as
Suggested by N. Jackson <address@hidden>. (Bug#21129)
---
lisp/textmodes/flyspell.el | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index a5dff07..2329f29 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1827,11 +1827,12 @@ as returned by `ispell-parse-output'."
;;* flyspell-check-previous-highlighted-word ... */
;;*---------------------------------------------------------------------*/
(defun flyspell-check-previous-highlighted-word (&optional arg)
- "Correct the closer misspelled word.
-This function scans a mis-spelled word before the cursor. If it finds one
-it proposes replacement for that word. With prefix arg, count that many
-misspelled words backwards."
- (interactive)
+ "Correct the closest previous word that is highlighted as misspelled.
+This function scans for a word which starts before point that has been
+highlighted by Flyspell as misspelled. If it finds one, it proposes
+a replacement for that word. With prefix arg N, check the Nth word
+before point that's highlighted as misspelled."
+ (interactive "P")
(let ((pos1 (point))
(pos (point))
(arg (if (or (not (numberp arg)) (< arg 1)) 1 arg))
@@ -1842,7 +1843,7 @@ misspelled words backwards."
(setq pos1 pos)
(if (> pos (point-min))
(progn
- (setq ovs (overlays-at (1- pos)))
+ (setq ovs (overlays-at pos))
(while (consp ovs)
(setq ov (car ovs))
(setq ovs (cdr ovs))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 5e63841: Fix flyspell-check-previous-highlighted-word,
Eli Zaretskii <=