diff --git a/ChangeLog b/ChangeLog
index 8307b7950d87f6bec0333892df7307bd6deecc64..dac6bb187a0c944dac4e282b50951f739d830094 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,9 @@ CVS code -
 	  Benbennick)
 	- Include <sys/types.h> in proto.h. (David Benbennick)  DLR:
 	  Remove some redundant inclusions of <sys/types.h> elsewhere.
+	- Move the main terminal initialization functions, aside from 
+	  initscr(), into a new terminal_init() function, and convert 
+	  nano to use it. (DLR)
 - files.c:
   close_open_file()
 	- Tweak to no longer rely on the return values of
@@ -69,6 +72,11 @@ CVS code -
   thanks_for_all_the_fish()
 	- Delete topwin, edit, and bottomwin. (David Benbennick)
 - nano.c:
+  do_alt_speller()
+	- When reloading the newly spell-checked temporary file, call
+	  terminal_init() to make sure that all the original terminal
+	  settings are restored, as a curses-based alternative spell
+	  checker (e.g. aspell) can change them. (DLR)
   do_justify()
 	- Add allow_respacing flag, used to indicate when we've moved to
 	  the next line after justifying the current line, and only run
diff --git a/src/nano.c b/src/nano.c
index 66fa16b6fafb0ad6223103ac811c56eb72e62c0a..3068f7b2a898b220c83b5bd006b224e3a0db53e1 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1796,6 +1796,7 @@ const char *do_alt_speller(char *tempfile_name)
 	/* Only reload the temp file if it isn't a marked selection. */
 #endif
 	free_filestruct(fileage);
+	terminal_init();
 	global_init(TRUE);
 	open_file(tempfile_name, FALSE, TRUE);
 #ifndef NANO_SMALL
@@ -2893,6 +2894,9 @@ void handle_sigwinch(int s)
     refresh();
 #endif
 
+    /* Restore the terminal to its previous state. */
+    terminal_init();
+
     /* Do the equivalent of what both mutt and Minimum Profit do:
      * Reinitialize all the windows based on the new screen
      * dimensions. */
@@ -2906,9 +2910,6 @@ void handle_sigwinch(int s)
     /* Turn cursor back on for sure. */
     curs_set(1);
 
-    /* Restore the terminal to its previously saved state. */
-    resetty();
-
     /* Reset all the input routines that rely on character sequences. */
     reset_kbinput();
 
@@ -3019,6 +3020,24 @@ void enable_flow_control(void)
     tcsetattr(0, TCSANOW, &term);
 }
 
+/* Set up the terminal state.  Put the terminal in cbreak mode (read one
+ * character at a time and interpret the special control keys), disable
+ * translation of carriage return (^M) into newline (^J) so that we can
+ * tell the difference between the Enter key and Ctrl-J, and disable
+ * echoing of characters as they're typed.  Finally, disable
+ * interpretation of the special control keys, and if we're not in
+ * preserve mode, disable interpretation of the flow control characters
+ * too. */
+void terminal_init(void)
+{
+    cbreak();
+    nonl();
+    noecho();
+    disable_signals();
+    if (!ISSET(PRESERVE))
+	disable_flow_control();
+}
+
 int main(int argc, char *argv[])
 {
     int optchr;
@@ -3442,28 +3461,10 @@ int main(int argc, char *argv[])
     /* Back up the old terminal settings so that they can be restored. */
     tcgetattr(0, &oldterm);
 
-   /* Curses initialization stuff: Start curses, save the state of the
-    * terminal mode, put the terminal in cbreak mode (read one character
-    * at a time and interpret the special control keys), disable
-    * translation of carriage return (^M) into newline (^J) so that we
-    * can tell the difference between the Enter key and Ctrl-J, and
-    * disable echoing of characters as they're typed.  Finally, disable
-    * interpretation of the special control keys, and if we're not in
-    * preserve mode, disable interpretation of the flow control
-    * characters too. */
+   /* Curses initialization stuff: Start curses and set up the
+    * terminal state. */
     initscr();
-    cbreak();
-    nonl();
-    noecho();
-    disable_signals();
-    if (!ISSET(PRESERVE))
-	disable_flow_control();
-
-#ifndef NANO_SMALL
-    /* Save the terminal's current state, so that we can restore it
-     * after a resize. */
-    savetty();
-#endif
+    terminal_init();
 
     /* Set up the global variables and the shortcuts. */
     global_init(FALSE);
diff --git a/src/proto.h b/src/proto.h
index abe135e309550e8e4dfbd5daabd4131ecccc0cc1..f47b6e65e664e57e66174be6c4d724bbe28da72b 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -360,6 +360,7 @@ void enable_signals(void);
 #endif
 void disable_flow_control(void);
 void enable_flow_control(void);
+void terminal_init(void);
 
 /* Public functions in rcfile.c */
 #ifdef ENABLE_NANORC