From 4b6baba2526c53c56fc1835b6353c0c87fe80a90 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 18 Dec 2016 15:54:48 +0000 Subject: [PATCH] Reinstate ispell character offset (bug#25219) * lisp/textmodes/ispell.el (ispell-process-line): insert -1 where ispell-offset used to be. --- lisp/textmodes/ispell.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 37a6ffc4ef9..23ee412b8c2 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3338,7 +3338,10 @@ Returns the sum SHIFT due to changes in word replacements." ;; Markers can move with highlighting! This destroys ;; end of region markers line-end and ispell-region-end (let ((word-start - (copy-marker (+ ispell-start (car (cdr poss))))) + ;; There is a -1 offset here as the string is escaped + ;; with '^' to prevent us accidentally sending any + ;; ispell commands. + (copy-marker (+ ispell-start -1 (car (cdr poss))))) (word-len (length (car poss))) (line-end (copy-marker ispell-end)) (line-start (copy-marker ispell-start)) -- 2.39.2