summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/flyspell.el9
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0dbc97c0df8..92ae206d104 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-16 Chong Yidong <cyd@stupidchicken.com>
+
+ * textmodes/flyspell.el (flyspell-word): Obey the offset specified
+ by ispell-parse-output (Bug#5575).
+
2010-02-16 Kenichi Handa <handa@m17n.org>
* international/ja-dic-cnv.el (iso-2022-7bit-short): Delete it.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 612f83123ba..ee7a52a1093 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1155,10 +1155,15 @@ than preceding) word when the cursor is not over a word."
nil)
(t
(setq flyspell-word-cache-result nil)
- ;; incorrect highlight the location
+ ;; Highlight the location as incorrect,
+ ;; including offset specified in POSS.
(if flyspell-highlight-flag
(flyspell-highlight-incorrect-region
- start end poss)
+ (if (and (consp poss)
+ (integerp (nth 1 poss)))
+ (+ start (nth 1 poss) -1)
+ start)
+ end poss)
(flyspell-notify-misspell word poss))
nil))))
;; return to original location