emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/ispell.el,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/ispell.el,v
Date: Wed, 26 Jul 2006 17:11:08 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       06/07/26 17:11:08

Index: ispell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -b -r1.200 -r1.201
--- ispell.el   9 Jun 2006 13:04:13 -0000       1.200
+++ ispell.el   26 Jul 2006 17:11:07 -0000      1.201
@@ -1650,9 +1650,15 @@
                                             cursor-location))
                    (if (not (equal new-word (car poss)))
                        (progn
-                         (delete-region start end)
-                         (setq start (point))
+                         (goto-char start)
+                         ;; Insert first and then delete,
+                         ;; to avoid collapsing markers before and after
+                         ;; into a single place.
                          (ispell-insert-word new-word)
+                         (delete-region (point) (+ (point) (- end start)))
+                         ;; It is meaningless to preserve the cursor position
+                         ;; inside a word that has changed.
+                         (setq cursor-location (point))
                          (setq end (point))))
                    (if (not (atom replace)) ;recheck spelling of replacement
                        (progn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]