From 05bbe066a68442dca234abb2c2f479bb0c2a293f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 16 Feb 2010 09:23:44 -0500 Subject: [PATCH] * textmodes/flyspell.el (flyspell-word): Obey the offset specified by ispell-parse-output (Bug#5575). --- lisp/ChangeLog | 5 +++++ lisp/textmodes/flyspell.el | 9 +++++++-- 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 + + * textmodes/flyspell.el (flyspell-word): Obey the offset specified + by ispell-parse-output (Bug#5575). + 2010-02-16 Kenichi Handa * 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 -- 2.39.5