diff --git a/ChangeLog b/ChangeLog
index ad8659d15b9bc7e3bc400f38b17280096409f3cd..273e6b53196fbbeb53d170acba62e2f5e88bcc4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,12 @@ CVS code -
 	- Add support for reading in UTF-8 sequences to the low-level
 	  input routines.  Changes to get_kbinput() and
 	  get_translated_kbinput(). (DLR)
+	- Reduce search_last_line to a local variable in findnextstr(),
+	  since it's always set to FALSE just before and after
+	  findnextstr() is called and isn't used anywhere except in
+	  findnextstr().  Changes to do_int_spell_fix(), findnextstr(),
+	  do_search(), do_research(), do_replace(), and
+	  do_find_bracket(). (DLR)
 - files.c:
   do_insertfile()
 	- Readd the NANO_SMALL #ifdef around the start_again: label to
@@ -133,8 +139,6 @@ CVS code -
 	  NANO_SMALL is defined and DISABLE_SPELLER isn't.  Also, turn
 	  the USE_REGEXP flag off during spell checking in order to
 	  avoid a potential segfault. (DLR)
-	- Fully save the position in the file, using edittop, current,
-	  current_x, and placewewant. (DLR)
   do_alt_speller()
 	- Call terminal_init() unconditionally after running the
 	  alternate spell checker, so that the terminal state is
diff --git a/src/nano.c b/src/nano.c
index babcddeee859e5c0a7ddfaf6c350c016c231e73b..0567c2f3d902554d71cec2c998b7fe6c2dfa35ff 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1420,7 +1420,7 @@ bool do_int_spell_fix(const char *word)
 {
     char *save_search;
     char *save_replace;
-    size_t current_x_save = current_x, pww_save = placewewant;
+    size_t current_x_save = current_x;
     filestruct *edittop_save = edittop;
     filestruct *current_save = current;
 	/* Save where we are. */
@@ -1466,9 +1466,6 @@ bool do_int_spell_fix(const char *word)
     edittop = fileage;
     current = fileage;
     current_x = -1;
-    placewewant = 0;
-
-    search_last_line = FALSE;
 
     /* Find the first whole-word occurrence of word. */
     while (findnextstr(TRUE, TRUE, FALSE, fileage, 0, word, NULL)) {
@@ -1487,7 +1484,6 @@ bool do_int_spell_fix(const char *word)
 	    do_replace_highlight(FALSE, word);
 
 	    if (accepted && strcmp(word, answer) != 0) {
-		search_last_line = FALSE;
 		current_x--;
 		do_replace_loop(word, current_save, &current_x_save, TRUE);
 	    }
@@ -1506,7 +1502,6 @@ bool do_int_spell_fix(const char *word)
     edittop = edittop_save;
     current = current_save;
     current_x = current_x_save;
-    placewewant = pww_save;
 
     /* Restore case sensitivity setting. */
     if (!case_sens_set)
diff --git a/src/proto.h b/src/proto.h
index 82d2ebb7e3cbdca808a41b9adc4424e9fdbe0839..3c28bc952dd1f071e9eeb2ff2333677d679e71b2 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -40,7 +40,6 @@ extern int mark_beginx;
 extern long totsize;
 extern long flags;
 extern ssize_t tabsize;
-extern int search_last_line;
 extern int currslen;
 
 #if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
diff --git a/src/search.c b/src/search.c
index 860d14dcb4cc42284fcfa229df9703ea92fb3bf1..627d90698e901605a1303a2ec11d6ba60da1c84e 100644
--- a/src/search.c
+++ b/src/search.c
@@ -32,7 +32,8 @@
 #include "nano.h"
 
 #ifdef HAVE_REGEX_H
-static int regexp_compiled = FALSE;
+static bool regexp_compiled = FALSE;
+	/* Have we compiled any regular expressions? */
 
 /* Regular expression helper functions. */
 
@@ -280,6 +281,8 @@ bool findnextstr(bool can_display_wrap, bool wholeword, bool
     size_t current_x_find = 0;
 	/* The location of the match we found. */
     int current_y_find = current_y;
+    bool search_last_line = FALSE;
+	/* Have we gone past the last line while searching? */
 
     /* rev_start might end up 1 character before the start or after the
      * end of the line.  This won't be a problem because strstrwrapper()
@@ -448,7 +451,6 @@ void do_search(void)
 	update_history(&search_history, answer);
 #endif
 
-    search_last_line = FALSE;
     didfind = findnextstr(TRUE, FALSE, FALSE, current, current_x,
 	answer, NULL);
 
@@ -502,7 +504,6 @@ void do_research(void)
 	    return;
 #endif
 
-	search_last_line = FALSE;
 	didfind = findnextstr(TRUE, FALSE, FALSE, current, current_x,
 		last_search, NULL);
 
@@ -904,10 +905,9 @@ void do_replace(void)
     last_replace = mallocstrcpy(last_replace, answer);
 
     /* Save where we are. */
+    edittop_save = edittop;
     begin = current;
     beginx = current_x;
-    edittop_save = edittop;
-    search_last_line = FALSE;
 
     numreplaced = do_replace_loop(last_search, begin, &beginx, FALSE);
 
@@ -915,6 +915,7 @@ void do_replace(void)
     edittop = edittop_save;
     current = begin;
     current_x = beginx;
+
     renumber_all();
     edit_refresh();
 
@@ -1053,7 +1054,6 @@ void do_find_bracket(void)
     /* We constructed regexp_pat to be a valid expression. */
     assert(regexp_compiled);
 
-    search_last_line = FALSE;
     while (TRUE) {
 	if (findnextstr(FALSE, FALSE, FALSE, current, current_x,
 		regexp_pat, NULL)) {