]> git.eshelyaron.com Git - emacs.git/commitdiff
(flyspell-auto-correct-previous-word): Use window-start and
authorChong Yidong <cyd@stupidchicken.com>
Fri, 27 Apr 2007 18:53:31 +0000 (18:53 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 27 Apr 2007 18:53:31 +0000 (18:53 +0000)
window-end.

lisp/textmodes/flyspell.el

index 185f2e8dea34803459017d640e495206add5b83c..a509fdf7f6c4c3f8661628bab9b3f203ab816163 100644 (file)
@@ -1961,12 +1961,8 @@ Sets `flyspell-auto-correct-previous-pos' to nil"
 But don't look beyond what's visible on the screen."
   (interactive "d")
 
-  (let (top bot)
-    (save-excursion
-      (move-to-window-line 0)
-      (setq top (point))
-      (move-to-window-line -1)
-      (setq bot (point)))
+  (let ((top (window-start))
+       (bot (window-end)))
     (save-excursion
       (save-restriction
        (narrow-to-region top bot)