# HG changeset patch # User Chong Yidong # Date 1177700011 0 # Node ID 460403d9f673b303f83a3057b434c87ae215377d # Parent 24101cde7185b4ad4eca9e900ae0f42a6011be7f (flyspell-auto-correct-previous-word): Use window-start and window-end. diff -r 24101cde7185 -r 460403d9f673 lisp/textmodes/flyspell.el --- a/lisp/textmodes/flyspell.el Fri Apr 27 18:53:22 2007 +0000 +++ b/lisp/textmodes/flyspell.el Fri Apr 27 18:53:31 2007 +0000 @@ -1961,12 +1961,8 @@ 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)