From 53c5ace8c351b25ee64adcae383944d64c492f7d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 22 May 2020 10:04:33 +0200 Subject: [PATCH] tweaks: rename a symbol, away from a double abbreviation --- src/files.c | 2 +- src/global.c | 24 ++++++++++++------------ src/help.c | 2 +- src/nano.h | 4 ++-- src/rcfile.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/files.c b/src/files.c index 103ec1ed..8eb46a31 100644 --- a/src/files.c +++ b/src/files.c @@ -1121,7 +1121,7 @@ void do_insertfile(void) response = do_prompt(TRUE, TRUE, #ifndef NANO_TINY - execute ? MEXTCMD : + execute ? MEXECUTE : #endif MINSERTFILE, given, #ifndef NANO_TINY diff --git a/src/global.c b/src/global.c index f5f63ace..309933f2 100644 --- a/src/global.c +++ b/src/global.c @@ -1079,7 +1079,7 @@ void shortcut_init(void) #ifdef ENABLE_MULTIBUFFER /* Multiple buffers are only available when not in restricted mode. */ if (!ISSET(RESTRICTED)) - add_to_funcs(flip_newbuffer, MINSERTFILE|MEXTCMD, + add_to_funcs(flip_newbuffer, MINSERTFILE|MEXECUTE, N_("New Buffer"), WITHORSANS(newbuffer_gist), TOGETHER, NOVIEW); #endif #ifndef NANO_TINY @@ -1091,10 +1091,10 @@ void shortcut_init(void) add_to_funcs(flip_execute, MINSERTFILE, N_("Execute Command"), WITHORSANS(execute_gist), TOGETHER, NOVIEW); - add_to_funcs(flip_pipe, MEXTCMD, + add_to_funcs(flip_pipe, MEXECUTE, N_("Pipe Text"), WITHORSANS(pipe_gist), TOGETHER, NOVIEW); - add_to_funcs(flip_execute, MEXTCMD, + add_to_funcs(flip_execute, MEXECUTE, N_("Read File"), WITHORSANS(readfile_gist), TOGETHER, NOVIEW); } #endif @@ -1358,17 +1358,17 @@ void shortcut_init(void) add_to_sclist(MWHEREIS|MREPLACE, "^R", 0, flip_replace, 0); add_to_sclist(MWHEREIS|MGOTOLINE, "^T", 0, flip_goto, 0); #ifdef ENABLE_HISTORIES - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "^P", 0, get_history_older_void, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "^N", 0, get_history_newer_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXECUTE, "^P", 0, get_history_older_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXECUTE, "^N", 0, get_history_newer_void, 0); #ifdef ENABLE_UTF8 if (using_utf8()) { - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "\xE2\x96\xb2", KEY_UP, get_history_older_void, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "\xE2\x96\xbc", KEY_DOWN, get_history_newer_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXECUTE, "\xE2\x96\xb2", KEY_UP, get_history_older_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXECUTE, "\xE2\x96\xbc", KEY_DOWN, get_history_newer_void, 0); } else #endif { - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "Up", KEY_UP, get_history_older_void, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "Down", KEY_DOWN, get_history_newer_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXECUTE, "Up", KEY_UP, get_history_older_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXECUTE, "Down", KEY_DOWN, get_history_newer_void, 0); } #endif #ifdef ENABLE_JUSTIFY @@ -1403,16 +1403,16 @@ void shortcut_init(void) add_to_sclist(MWRITEFILE, "M-A", 0, append_void, 0); add_to_sclist(MWRITEFILE, "M-P", 0, prepend_void, 0); add_to_sclist(MWRITEFILE, "M-B", 0, backup_file_void, 0); - add_to_sclist(MINSERTFILE|MEXTCMD, "^X", 0, flip_execute, 0); + add_to_sclist(MINSERTFILE|MEXECUTE, "^X", 0, flip_execute, 0); } add_to_sclist(MINSERTFILE, "M-N", 0, flip_convert, 0); #endif #ifdef ENABLE_MULTIBUFFER /* Only when not in restricted mode, allow multiple buffers. */ if (!ISSET(RESTRICTED)) { - add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", 0, flip_newbuffer, 0); + add_to_sclist(MINSERTFILE|MEXECUTE, "M-F", 0, flip_newbuffer, 0); #ifndef NANO_TINY - add_to_sclist(MEXTCMD, "M-\\", 0, flip_pipe, 0); + add_to_sclist(MEXECUTE, "M-\\", 0, flip_pipe, 0); #endif } #endif diff --git a/src/help.c b/src/help.c index afd1f453..bdb666d5 100644 --- a/src/help.c +++ b/src/help.c @@ -407,7 +407,7 @@ void help_init(void) } #endif /* ENABLE_SPELLER */ #ifndef NANO_TINY - else if (currmenu == MEXTCMD) { + else if (currmenu == MEXECUTE) { htx[0] = N_("Execute Command Help Text\n\n " "This mode allows you to insert the output of a " "command run by the shell into the current buffer (or " diff --git a/src/nano.h b/src/nano.h index a54082e1..62392b0f 100644 --- a/src/nano.h +++ b/src/nano.h @@ -549,7 +549,7 @@ enum #define MGOTOLINE (1<<4) #define MWRITEFILE (1<<5) #define MINSERTFILE (1<<6) -#define MEXTCMD (1<<7) +#define MEXECUTE (1<<7) #define MHELP (1<<8) #define MSPELL (1<<9) #define MBROWSER (1<<10) @@ -560,7 +560,7 @@ enum #define MFINDINHELP (1<<15) /* This is an abbreviation for all menus except Help and Browser and YesNo. */ #define MMOST (MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|\ - MEXTCMD|MWHEREISFILE|MGOTODIR|MFINDINHELP|MSPELL|MLINTER) + MEXECUTE|MWHEREISFILE|MGOTODIR|MFINDINHELP|MSPELL|MLINTER) #ifndef NANO_TINY #define MSOME MMOST|MBROWSER #else diff --git a/src/rcfile.c b/src/rcfile.c index 6eca8132..b574db4e 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -157,7 +157,7 @@ char *menunames[NUMBER_OF_MENUS] = { "main", "search", "replace", "replacewith", "all" }; int menusymbols[NUMBER_OF_MENUS] = { MMAIN, MWHEREIS, MREPLACE, MREPLACEWITH, MYESNO, MGOTOLINE, MWRITEFILE, MINSERTFILE, - MEXTCMD, MHELP, MSPELL, MLINTER, + MEXECUTE, MHELP, MSPELL, MLINTER, MBROWSER, MWHEREISFILE, MGOTODIR, MMOST|MBROWSER|MHELP|MYESNO }; #endif /* ENABLE_NANORC */