add a bunch of key-related fixes: put Meta-( (Meta-9), Meta-) (Meta-0),
and Meta-J back in the shortcut list since Meta-G is used in the file
browser and not as a toggle, tweak nanogetstr() and statusq() so that
resetstatuspos can be reduced to a static bool, change the names of some
keys to be more consistent, and add the ^R^X^X and ^W^T^T shortcuts
(note that the latter doesn't preserve the contents of the statusbar yet
when ^T is pressed at the "Go To Line" prompt), and add a few other
miscellaneous tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
diff --git a/src/global.c b/src/global.c
index 39a1eff..05fd10f 100644
--- a/src/global.c
+++ b/src/global.c
@@ -93,8 +93,6 @@
 char *backup_dir = NULL;	/* Backup directory. */
 #endif
 
-bool resetstatuspos;		/* Hack for resetting the status bar 
-				   cursor position */
 char *answer = NULL;		/* Answer str to many questions */
 int totlines = 0;		/* Total number of lines in the file */
 long totsize = 0;		/* Total number of bytes in the file */
@@ -130,7 +128,7 @@
 shortcut *whereis_list = NULL;
 shortcut *replace_list = NULL;
 shortcut *replace_list_2 = NULL; 	/* 2nd half of replace dialog */
-shortcut *goto_list = NULL;
+shortcut *gotoline_list = NULL;
 shortcut *writefile_list = NULL;
 shortcut *insertfile_list = NULL;
 #ifndef DISABLE_HELP
@@ -277,7 +275,7 @@
 	N_("Uncut from the cutbuffer into the current line");
     const char *nano_cursorpos_msg = N_("Show the position of the cursor");
     const char *nano_spell_msg = N_("Invoke the spell checker, if available");
-    const char *nano_goto_msg = N_("Go to a specific line number");
+    const char *nano_gotoline_msg = N_("Go to a specific line number");
     const char *nano_replace_msg = N_("Replace text within the editor");
     const char *nano_prevline_msg = N_("Move to the previous line");
     const char *nano_nextline_msg = N_("Move to the next line");
@@ -470,8 +468,8 @@
 #endif
 		nano_disabled_msg);
 
-    sc_init_one(&main_list, NANO_GOTO_KEY, go_to_line_msg,
-	IFHELP(nano_goto_msg, NANO_ALT_GOTO_KEY), NANO_GOTO_FKEY,
+    sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
+	IFHELP(nano_gotoline_msg, NANO_GOTOLINE_ALTKEY), NANO_GOTOLINE_FKEY,
 	NANO_NO_KEY, VIEW, do_gotoline_void);
 
     sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg,
@@ -507,7 +505,7 @@
 	NANO_NO_KEY, VIEW, total_refresh);
 
     sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"),
-	IFHELP(nano_mark_msg, NANO_ALT_MARK_KEY),
+	IFHELP(nano_mark_msg, NANO_MARK_ALTKEY),
 	NANO_NO_KEY, NANO_NO_KEY, NOVIEW,
 #ifndef NANO_SMALL
 		do_mark
@@ -615,29 +613,29 @@
 	NANO_NO_KEY, VIEW, do_last_line);
 
     /* Translators: try to keep this string under 10 characters long */
-    sc_init_one(&whereis_list, NANO_OTHERSEARCH_KEY, replace_msg,
+    sc_init_one(&whereis_list, NANO_TOOTHERSEARCH_KEY, replace_msg,
 	IFHELP(nano_replace_msg, NANO_NO_KEY), NANO_REPLACE_FKEY,
 	NANO_NO_KEY, VIEW, do_replace);
 
     /* Translators: try to keep this string under 10 characters long */
-    sc_init_one(&whereis_list, NANO_FROMSEARCHTOGOTO_KEY, go_to_line_msg,
-	IFHELP(nano_goto_msg, NANO_NO_KEY), NANO_GOTO_FKEY,
+    sc_init_one(&whereis_list, NANO_TOGOTOLINE_KEY, go_to_line_msg,
+	IFHELP(nano_gotoline_msg, NANO_NO_KEY), NANO_GOTOLINE_FKEY,
 	NANO_NO_KEY, VIEW, do_gotoline_void);
 
 #ifndef DISABLE_JUSTIFY
     /* Translators: try to keep this string under 10 characters long */
     sc_init_one(&whereis_list, NANO_PARABEGIN_KEY, beg_of_par_msg,
-	IFHELP(nano_parabegin_msg, NANO_NO_KEY), NANO_NO_KEY,
-	NANO_NO_KEY, VIEW, do_para_begin);
+	IFHELP(nano_parabegin_msg, NANO_PARABEGIN_ALTKEY1), NANO_NO_KEY,
+	NANO_PARABEGIN_ALTKEY2, VIEW, do_para_begin);
 
     /* Translators: try to keep this string under 10 characters long */
     sc_init_one(&whereis_list, NANO_PARAEND_KEY, end_of_par_msg,
-	IFHELP(nano_paraend_msg, NANO_NO_KEY), NANO_NO_KEY,
-	NANO_NO_KEY, VIEW, do_para_end);
+	IFHELP(nano_paraend_msg, NANO_PARAEND_ALTKEY1), NANO_NO_KEY,
+	NANO_PARAEND_ALTKEY2, VIEW, do_para_end);
 
     /* Translators: try to keep this string under 10 characters long */
     sc_init_one(&whereis_list, NANO_FULLJUSTIFY_KEY, fulljstify_msg,
-	IFHELP(nano_fulljustify_msg, NANO_NO_KEY), NANO_NO_KEY,
+	IFHELP(nano_fulljustify_msg, NANO_FULLJUSTIFY_ALTKEY), NANO_NO_KEY,
 	NANO_NO_KEY, NOVIEW, do_full_justify);
 #endif
 
@@ -690,12 +688,12 @@
 	NANO_NO_KEY, VIEW, do_last_line);
 
     /* Translators: try to keep this string under 12 characters long */
-    sc_init_one(&replace_list, NANO_OTHERSEARCH_KEY, N_("No Replace"),
+    sc_init_one(&replace_list, NANO_TOOTHERSEARCH_KEY, N_("No Replace"),
 	IFHELP(nano_whereis_msg, NANO_NO_KEY), NANO_REPLACE_FKEY,
 	NANO_NO_KEY, VIEW, do_search);
 
-    sc_init_one(&replace_list, NANO_FROMSEARCHTOGOTO_KEY, go_to_line_msg,
-	IFHELP(nano_goto_msg, NANO_NO_KEY), NANO_GOTO_FKEY,
+    sc_init_one(&replace_list, NANO_TOGOTOLINE_KEY, go_to_line_msg,
+	IFHELP(nano_gotoline_msg, NANO_NO_KEY), NANO_GOTOLINE_FKEY,
 	NANO_NO_KEY, VIEW, do_gotoline_void);
 
 #ifndef NANO_SMALL
@@ -748,9 +746,9 @@
 	NANO_NO_KEY, VIEW, 0);
 #endif
 
-    free_shortcutage(&goto_list);
+    free_shortcutage(&gotoline_list);
 
-    sc_init_one(&goto_list, NANO_HELP_KEY, get_help_msg,
+    sc_init_one(&gotoline_list, NANO_HELP_KEY, get_help_msg,
 	IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
 	NANO_NO_KEY, VIEW,
 #ifndef DISABLE_HELP
@@ -760,18 +758,22 @@
 #endif
 		);
 
-    sc_init_one(&goto_list, NANO_CANCEL_KEY, cancel_msg,
+    sc_init_one(&gotoline_list, NANO_CANCEL_KEY, cancel_msg,
 	IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
 	NANO_NO_KEY, VIEW, 0);
 
-    sc_init_one(&goto_list, NANO_FIRSTLINE_KEY, first_line_msg,
+    sc_init_one(&gotoline_list, NANO_FIRSTLINE_KEY, first_line_msg,
 	IFHELP(nano_firstline_msg, NANO_NO_KEY), NANO_NO_KEY,
 	NANO_NO_KEY, VIEW, do_first_line);
 
-    sc_init_one(&goto_list, NANO_LASTLINE_KEY, last_line_msg,
+    sc_init_one(&gotoline_list, NANO_LASTLINE_KEY, last_line_msg,
 	IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_NO_KEY,
 	NANO_NO_KEY, VIEW, do_last_line);
 
+    sc_init_one(&gotoline_list, NANO_TOOTHERWHEREIS_KEY, N_("Go To Text"),
+	IFHELP(nano_whereis_msg, NANO_NO_KEY), NANO_NO_KEY,
+	NANO_NO_KEY, VIEW, do_search);
+
 #ifndef DISABLE_HELP
     free_shortcutage(&help_list);
 
@@ -892,7 +894,7 @@
      * It's useless since inserting files is disabled. */
     /* Translators: try to keep this string under 22 characters long */
     if (!ISSET(RESTRICTED))
-	sc_init_one(&insertfile_list, NANO_EXTCMD_KEY, N_("Execute Command"),
+	sc_init_one(&insertfile_list, NANO_TOOTHERINSERT_KEY, N_("Execute Command"),
 		IFHELP(nano_execute_msg, NANO_NO_KEY), NANO_NO_KEY,
 		NANO_NO_KEY, NOVIEW, 0);
 
@@ -942,6 +944,10 @@
 	IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
 	NANO_NO_KEY, VIEW, 0);
 
+    sc_init_one(&extcmd_list, NANO_TOOTHERINSERT_KEY, N_("Insert File"),
+	IFHELP(nano_insert_msg, NANO_NO_KEY), NANO_NO_KEY,
+	NANO_NO_KEY, VIEW, 0);
+
 #ifdef ENABLE_MULTIBUFFER
     sc_init_one(&extcmd_list, NANO_NO_KEY, new_buffer_msg,
 	IFHELP(nano_multibuffer_msg, TOGGLE_MULTIBUFFER_KEY), NANO_NO_KEY,
@@ -975,8 +981,8 @@
 	NANO_NO_KEY, VIEW, 0);
 
     /* Translators: try to keep this string under 22 characters long */
-    sc_init_one(&browser_list, NANO_GOTO_KEY, N_("Go To Dir"),
-	IFHELP(nano_gotodir_msg, NANO_ALT_GOTO_KEY), NANO_GOTO_FKEY,
+    sc_init_one(&browser_list, NANO_GOTOLINE_KEY, N_("Go To Dir"),
+	IFHELP(nano_gotodir_msg, NANO_GOTOLINE_ALTKEY), NANO_GOTOLINE_FKEY,
 	NANO_NO_KEY, VIEW, 0);
 
     free_shortcutage(&gotodir_list);
@@ -1161,7 +1167,7 @@
     free_shortcutage(&whereis_list);
     free_shortcutage(&replace_list);
     free_shortcutage(&replace_list_2);
-    free_shortcutage(&goto_list);
+    free_shortcutage(&gotoline_list);
     free_shortcutage(&writefile_list);
     free_shortcutage(&insertfile_list);
 #ifndef DISABLE_HELP