diff --git a/src/files.c b/src/files.c index 78e4ccbb..ea03b03f 100644 --- a/src/files.c +++ b/src/files.c @@ -1110,7 +1110,7 @@ bool execute_command(const char *command) /* Insert a file into the current buffer (or into a new buffer). But when * execute is TRUE, run a command in the shell and insert its output into * the buffer, or just run one of the tools listed in the help lines. */ -void do_insertfile(bool execute) +void insert_a_file_or(bool execute) { int response; const char *msg; @@ -1301,10 +1301,10 @@ void do_insertfile(bool execute) } /* If the current mode of operation allows it, go insert a file. */ -void do_insertfile_void(void) +void do_insertfile(void) { if (!in_restricted_mode()) - do_insertfile(FALSE); + insert_a_file_or(FALSE); } #ifndef NANO_TINY @@ -1312,7 +1312,7 @@ void do_insertfile_void(void) void do_execute(void) { if (!in_restricted_mode()) - do_insertfile(TRUE); + insert_a_file_or(TRUE); } #endif diff --git a/src/global.c b/src/global.c index 8eeee1e1..1cea6444 100644 --- a/src/global.c +++ b/src/global.c @@ -728,7 +728,7 @@ void shortcut_init(void) * otherwise, show Insert anyway, to keep the help items paired. */ if (!ISSET(RESTRICTED)) #endif - add_to_funcs(do_insertfile_void, MMAIN, + add_to_funcs(do_insertfile, MMAIN, N_("Read File"), WITHORSANS(readfile_gist), BLANKAFTER, /* We allow inserting files in view mode if multibuffer mode * is available, so that the user can view multiple files. */ @@ -1172,8 +1172,8 @@ void shortcut_init(void) if (!ISSET(PRESERVE)) add_to_sclist(MMAIN, "^S", 0, do_savefile, 0); add_to_sclist(MMAIN, "^O", 0, do_writeout, 0); - add_to_sclist(MMAIN, "^R", 0, do_insertfile_void, 0); - add_to_sclist(MMAIN, "Ins", KEY_IC, do_insertfile_void, 0); + add_to_sclist(MMAIN, "^R", 0, do_insertfile, 0); + add_to_sclist(MMAIN, "Ins", KEY_IC, do_insertfile, 0); if (!ISSET(PRESERVE)) add_to_sclist(MMAIN|MBROWSER|MHELP, "^Q", 0, do_search_backward, 0); add_to_sclist(MMAIN|MBROWSER|MHELP, "^W", 0, do_search_forward, 0); @@ -1472,7 +1472,7 @@ void shortcut_init(void) #ifdef ENABLE_JUSTIFY add_to_sclist(MMAIN, "F4", KEY_F(4), do_justify, 0); #endif - add_to_sclist(MMAIN, "F5", KEY_F(5), do_insertfile_void, 0); + add_to_sclist(MMAIN, "F5", KEY_F(5), do_insertfile, 0); add_to_sclist(MMAIN|MBROWSER|MHELP, "F6", KEY_F(6), do_search_forward, 0); add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "F7", KEY_F(7), do_page_up, 0); add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "F8", KEY_F(8), do_page_down, 0); @@ -1485,7 +1485,7 @@ void shortcut_init(void) #if defined(KEY_CANCEL) && defined(KEY_SUSPEND) && defined(KEY_SIC) add_to_sclist((MMOST & ~MMAIN) | MYESNO, "", KEY_CANCEL, do_cancel, 0); add_to_sclist(MMAIN|MEXECUTE, "", KEY_SUSPEND, suspend_nano, 0); - add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile_void, 0); + add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile, 0); #endif #ifndef NANO_TINY /* Catch and ignore bracketed paste marker keys. */ diff --git a/src/prototypes.h b/src/prototypes.h index b2bcb01f..8ef40f28 100644 --- a/src/prototypes.h +++ b/src/prototypes.h @@ -282,7 +282,7 @@ void close_buffer(void); void read_file(FILE *f, int fd, const char *filename, bool undoable); int open_file(const char *filename, bool new_one, FILE **f); char *get_next_filename(const char *name, const char *suffix); -void do_insertfile_void(void); +void do_insertfile(void); #ifndef NANO_TINY void do_execute(void); #endif diff --git a/src/rcfile.c b/src/rcfile.c index 8de51c31..0623c570 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -246,7 +246,7 @@ keystruct *strtosc(const char *input) else if (!strcmp(input, "savefile")) s->func = do_savefile; else if (!strcmp(input, "insert")) - s->func = do_insertfile_void; + s->func = do_insertfile; else if (!strcmp(input, "whereis")) s->func = do_search_forward; else if (!strcmp(input, "wherewas"))