]> git.wh0rd.org Git - nano.git/commitdiff
Renaming MREPLACE2 to MREPLACEWITH, for clarity.
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 16 Apr 2014 09:26:15 +0000 (09:26 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Wed, 16 Apr 2014 09:26:15 +0000 (09:26 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/global.c
src/help.c
src/nano.h
src/search.c

index 7bd4121e1e51a1b29607ef10ef30d4dc4b92f90c..3b545123e3ad24ab10e842c475fbe19b6faeb9a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
        Enter and Backspace and so on don't make any sense there.
        * src/nano.h, src/global.c (shortcut_init): Rename MALL to MMOST,
        to be more accurate.
+       * src/nano.h, src/global.c, src/help.c, src/search.c: Rename
+       MREPLACE2 to MREPLACEWITH, for clarity.
 
 2014-04-15  Benno Schulenberg  <bensberg@justemail.net>
        * src/nano.c (precalc_multicolorinfo): Actually set the intended
index 99eb56f7ed9cabee15d3ac1f5e2820f604b655af..eefbbb42c9cd1a81edba6f771be57ebd4a9fb075 100644 (file)
@@ -738,11 +738,11 @@ void shortcut_init(void)
     /* Start populating the different menus with functions. */
 
     add_to_funcs(do_help_void,
-       (MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER),
+       (MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER),
        get_help_msg, IFSCHELP(nano_help_msg), FALSE, VIEW);
 
     add_to_funcs(do_cancel,
-       (MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR|MYESNO|MLINTER),
+       (MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR|MYESNO|MLINTER),
        cancel_msg, IFSCHELP(nano_cancel_msg), FALSE, VIEW);
 
     add_to_funcs(do_exit, MMAIN,
@@ -841,10 +841,10 @@ void shortcut_init(void)
 #endif
 
     add_to_funcs(do_first_line,
-       (MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
+       (MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE),
        first_line_msg, IFSCHELP(nano_firstline_msg), FALSE, VIEW);
     add_to_funcs(do_last_line,
-       (MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
+       (MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE),
        last_line_msg, IFSCHELP(nano_lastline_msg), TRUE, VIEW);
 
     add_to_funcs(do_gotolinecolumn_void, (MMAIN|MWHEREIS),
@@ -945,7 +945,7 @@ void shortcut_init(void)
 
     add_to_funcs(do_verbatim_input, MMAIN, N_("Verbatim Input"),
        IFSCHELP(nano_verbatim_msg), FALSE, NOVIEW);
-    add_to_funcs(do_verbatim_input, MWHEREIS|MREPLACE|MREPLACE2|MEXTCMD|MSPELL,
+    add_to_funcs(do_verbatim_input, MWHEREIS|MREPLACE|MREPLACEWITH|MEXTCMD|MSPELL,
        "", "", FALSE, NOVIEW);
 
     add_to_funcs(do_tab, MMAIN, N_("Tab"), IFSCHELP(nano_tab_msg),
@@ -1012,11 +1012,11 @@ void shortcut_init(void)
 
 #ifndef NANO_TINY
     add_to_funcs(get_history_older_void,
-       (MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE),
+       (MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE),
        prev_history_msg, IFSCHELP(nano_prev_history_msg), FALSE, VIEW);
 
     add_to_funcs(get_history_newer_void,
-       (MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE),
+       (MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE),
        next_history_msg, IFSCHELP(nano_next_history_msg), FALSE, VIEW);
 #endif
 
@@ -1080,9 +1080,9 @@ void shortcut_init(void)
 
     /* Start associating key combos with functions in specific menus. */
 
-    add_to_sclist(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER,
+    add_to_sclist(MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER,
        "^G", do_help_void, 0, TRUE);
-    add_to_sclist(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER,
+    add_to_sclist(MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER,
        "F1", do_help_void, 0, TRUE);
     add_to_sclist(MMAIN|MHELP|MBROWSER, "^X", do_exit, 0, TRUE);
     add_to_sclist(MMAIN|MHELP|MBROWSER, "F2", do_exit, 0, TRUE);
@@ -1156,35 +1156,35 @@ void shortcut_init(void)
     add_to_sclist(MMOST, "^E", do_end, 0, TRUE);
     add_to_sclist(MMOST, "kend", do_end, 0, TRUE);
 #ifndef NANO_TINY
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE, "^P", get_history_older_void, 0, FALSE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE, "kup", get_history_older_void, 0, FALSE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE, "^N", get_history_newer_void, 0, FALSE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE, "kdown", get_history_newer_void, 0, FALSE);
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "^P", get_history_older_void, 0, FALSE);
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "kup", get_history_older_void, 0, FALSE);
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "^N", get_history_newer_void, 0, FALSE);
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "kdown", get_history_newer_void, 0, FALSE);
 #endif
 #ifndef DISABLE_JUSTIFY
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH,
        "^W", do_para_begin_void, 0, TRUE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH,
        "^O", do_para_end_void, 0, TRUE);
     add_to_sclist(MMOST, "M-(", do_para_begin_void, 0, TRUE);
     add_to_sclist(MMOST, "M-9", do_para_begin_void, 0, TRUE);
     add_to_sclist(MMOST, "M-)", do_para_end_void, 0, TRUE);
     add_to_sclist(MMOST, "M-0", do_para_end_void, 0, TRUE);
 #endif
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH,
        "M-C", case_sens_void, 0, FALSE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH,
        "M-B", backwards_void, 0, FALSE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH,
        "M-R", regexp_void, 0, FALSE);
 
     add_to_sclist(MMAIN|MHELP, "M-\\", do_first_line, 0, TRUE);
     add_to_sclist(MMAIN|MHELP, "M-|", do_first_line, 0, TRUE);
     add_to_sclist(MMAIN|MHELP, "M-/", do_last_line, 0, TRUE);
     add_to_sclist(MMAIN|MHELP, "M-?", do_last_line, 0, TRUE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE,
        "^Y", do_first_line, 0, TRUE);
-    add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE,
+    add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE,
        "^V", do_last_line, 0, TRUE);
 
 #ifndef DISABLE_BROWSER
@@ -1244,7 +1244,7 @@ void shortcut_init(void)
     add_to_sclist(MHELP, "^G", do_exit, 0, TRUE);
     add_to_sclist(MGOTOLINE, "^T", gototext_void, 0, FALSE);
     add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", new_buffer_void, 0, FALSE);
-    add_to_sclist((MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR|MYESNO|MLINTER),
+    add_to_sclist((MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR|MYESNO|MLINTER),
        "^C", do_cancel, 0, FALSE);
     add_to_sclist(MWRITEFILE, "M-D", dos_format_void, 0, FALSE);
     add_to_sclist(MWRITEFILE, "M-M", mac_format_void, 0, FALSE);
@@ -1606,7 +1606,7 @@ int strtomenu(char *input)
        return MREPLACE;
     else if (!strcasecmp(input, "replace2") ||
             !strcasecmp(input, "replacewith"))
-       return MREPLACE2;
+       return MREPLACEWITH;
     else if (!strcasecmp(input, "gotoline"))
        return MGOTOLINE;
     else if (!strcasecmp(input, "writeout"))
index f32e1a799f158a42b0099e28f9f5efa4824c706f..80f1374e7c57bc3b2ae270b2037754b89de434f5 100644 (file)
@@ -217,7 +217,7 @@ void help_init(void)
 #endif
 
     /* First, set up the initial help text for the current function. */
-    if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACE2) {
+    if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACEWITH) {
        htx[0] = N_("Search Command Help Text\n\n "
                "Enter the words or characters you would like to "
                "search for, and then press Enter.  If there is a "
index adab654ce6b7c4fc1b4df622293e65dd2fb3bde0..68543161f80ec03da79886f3d5f2408c5a6cacea 100644 (file)
@@ -540,7 +540,7 @@ enum
 #define MMAIN                          (1<<0)
 #define        MWHEREIS                        (1<<1)
 #define        MREPLACE                        (1<<2)
-#define        MREPLACE2                       (1<<3)
+#define        MREPLACEWITH                    (1<<3)
 #define        MGOTOLINE                       (1<<4)
 #define        MWRITEFILE                      (1<<5)
 #define        MINSERTFILE                     (1<<6)
@@ -553,7 +553,7 @@ enum
 #define MYESNO                         (1<<13)
 #define MLINTER                                (1<<14)
 /* This is an abbreviation for all menus except Help and YesNo. */
-#define        MMOST   (MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MBROWSER|MWHEREISFILE|MGOTODIR|MSPELL|MLINTER)
+#define        MMOST   (MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MBROWSER|MWHEREISFILE|MGOTODIR|MSPELL|MLINTER)
 
 /* Control key sequences.  Changing these would be very, very bad. */
 #define NANO_CONTROL_SPACE 0
index 0673f7aa2b1202d6dd3052211ab1944b27718c19..b7db5bbf4bcd574f2ad32b5e1c0cfc32403b2971 100644 (file)
@@ -954,7 +954,7 @@ void do_replace(void)
 #ifndef DISABLE_TABCOMP
        TRUE,
 #endif
-       MREPLACE2, last_replace,
+       MREPLACEWITH, last_replace,
        &meta_key, &func_key,
 #ifndef NANO_TINY
        &replace_history,