mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
tweaks: rename two functions, to get rid of one more senseless suffix
This commit is contained in:
parent
d3c7e9d2f6
commit
27f170815f
@ -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
|
||||
|
||||
|
10
src/global.c
10
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. */
|
||||
|
@ -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
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user