# HG changeset patch # User Richard M. Stallman # Date 1179527508 0 # Node ID 21c0fd9e61cbc9a25cd575c623bf2a72b9e4bacf # Parent d973d3fcb308ffc6c5b1e73cba126d8687f4efa1 (ispell-get-word): Return markers for start and end positions. (ispell-word): Assume END is a marker. diff -r d973d3fcb308 -r 21c0fd9e61cb lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Fri May 18 22:31:25 2007 +0000 +++ b/lisp/textmodes/ispell.el Fri May 18 22:31:48 2007 +0000 @@ -1669,7 +1669,7 @@ ;; to avoid collapsing markers before and after ;; into a single place. (ispell-insert-word new-word) - (delete-region (point) (+ (point) (- end start))) + (delete-region (point) end) ;; It is meaningless to preserve the cursor position ;; inside a word that has changed. (setq cursor-location (point)) @@ -1751,8 +1751,8 @@ ;; return dummy word when just flagging misspellings (list "" (point) (point)) (error "No word found to check!")) - (setq start (match-beginning 0) - end (point) + (setq start (copy-marker (match-beginning 0)) + end (point-marker) word (buffer-substring-no-properties start end)) (list word start end))))