(ispell-get-word): Return markers for start and end positions.
(ispell-word): Assume END is a marker.
This commit is contained in:
parent
ce8fd9f3cb
commit
64953c0a99
2 changed files with 22 additions and 3 deletions
|
@ -1669,7 +1669,7 @@ quit spell session exited."
|
|||
;; 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 @@ which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'."
|
|||
;; 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))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue