Commit a0f66c06 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Renaming 'no_replace_void()' to 'flip_replace_void()',

to show what it actually does.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 16 additions and 13 deletions
+16 -13
2014-06-23 Benno Schulenberg <bensberg@justemail.net> 2014-06-23 Benno Schulenberg <bensberg@justemail.net>
* src/nano.h, src/move.c (do_up, do_down), src/winio.c (edit_scrol): * src/nano.h, src/move.c (do_up, do_down), src/winio.c (edit_scrol):
Rename UP_DIR and DOWN_DIR to UPWARD and DOWNWARD, for clarity. Rename UP_DIR and DOWN_DIR to UPWARD and DOWNWARD, for clarity.
* src/proto.h, src/global.c, src/search.c: Rename 'no_replace_void()'
to 'flip_replace_void()', to show what it actually does.
* doc/man/nanorc.5, doc/texinfo/nano.texi: Update the docs for that.
2014-06-22 Benno Schulenberg <bensberg@justemail.net> 2014-06-22 Benno Schulenberg <bensberg@justemail.net>
* src/browser.c (parse_browser_input), src/help.c (parse_help_input): * src/browser.c (parse_browser_input), src/help.c (parse_help_input):
......
...@@ -514,8 +514,8 @@ Shows the previous history entry in the prompt menus (e.g. search). ...@@ -514,8 +514,8 @@ Shows the previous history entry in the prompt menus (e.g. search).
.B nexthistory .B nexthistory
Shows the next history entry in the prompt menus (e.g. search). Shows the next history entry in the prompt menus (e.g. search).
.TP .TP
.B dontreplace .B flipreplace
Switches back to searching instead of replacing. Toggles between searching for something and replacing something.
.TP .TP
.B flipexecute .B flipexecute
Toggles between inserting a file and executing a command. Toggles between inserting a file and executing a command.
......
...@@ -1040,8 +1040,8 @@ Shows the previous history entry in the prompt menus (e.g. search). ...@@ -1040,8 +1040,8 @@ Shows the previous history entry in the prompt menus (e.g. search).
@item nexthistory @item nexthistory
Shows the next history entry in the prompt menus (e.g. search). Shows the next history entry in the prompt menus (e.g. search).
@item dontreplace @item flipreplace
Switches back to searching instead of replacing. Toggles between searching for something and replacing something.
@item flipexecute @item flipexecute
Toggles between inserting a file and executing a command. Toggles between inserting a file and executing a command.
......
...@@ -267,7 +267,7 @@ void backup_file_void(void) ...@@ -267,7 +267,7 @@ void backup_file_void(void)
void new_buffer_void(void) void new_buffer_void(void)
{ {
} }
void no_replace_void(void) void flip_replace_void(void)
{ {
} }
void flip_execute_void(void) void flip_execute_void(void)
...@@ -741,10 +741,10 @@ void shortcut_init(void) ...@@ -741,10 +741,10 @@ void shortcut_init(void)
N_("Backwards"), IFSCHELP(nano_reverse_msg), FALSE, VIEW); N_("Backwards"), IFSCHELP(nano_reverse_msg), FALSE, VIEW);
#endif #endif
add_to_funcs(do_replace, MWHEREIS, add_to_funcs(flip_replace_void, MWHEREIS,
replace_tag, IFSCHELP(nano_replace_msg), FALSE, VIEW); replace_tag, IFSCHELP(nano_replace_msg), FALSE, VIEW);
add_to_funcs(no_replace_void, MREPLACE, add_to_funcs(flip_replace_void, MREPLACE,
N_("No Replace"), IFSCHELP(nano_whereis_msg), FALSE, VIEW); N_("No Replace"), IFSCHELP(nano_whereis_msg), FALSE, VIEW);
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
...@@ -1115,8 +1115,7 @@ void shortcut_init(void) ...@@ -1115,8 +1115,7 @@ void shortcut_init(void)
add_to_sclist(MWHEREIS|MREPLACE, "M-C", case_sens_void, 0, FALSE); add_to_sclist(MWHEREIS|MREPLACE, "M-C", case_sens_void, 0, FALSE);
#endif #endif
add_to_sclist(MWHEREIS|MREPLACE, "M-R", regexp_void, 0, FALSE); add_to_sclist(MWHEREIS|MREPLACE, "M-R", regexp_void, 0, FALSE);
add_to_sclist(MWHEREIS, "^R", do_replace, 0, FALSE); add_to_sclist(MWHEREIS|MREPLACE, "^R", flip_replace_void, 0, FALSE);
add_to_sclist(MREPLACE, "^R", no_replace_void, 0, FALSE);
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^Y", do_first_line, 0, TRUE); add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^Y", do_first_line, 0, TRUE);
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^V", do_last_line, 0, TRUE); add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^V", do_last_line, 0, TRUE);
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
...@@ -1474,8 +1473,9 @@ sc *strtosc(char *input) ...@@ -1474,8 +1473,9 @@ sc *strtosc(char *input)
s->scfunc = backwards_void; s->scfunc = backwards_void;
s->execute = FALSE; s->execute = FALSE;
#endif #endif
} else if (!strcasecmp(input, "dontreplace")) { } else if (!strcasecmp(input, "flipreplace") ||
s->scfunc = no_replace_void; !strcasecmp(input, "dontreplace")) {
s->scfunc = flip_replace_void;
s->execute = FALSE; s->execute = FALSE;
} else if (!strcasecmp(input, "gototext")) { } else if (!strcasecmp(input, "gototext")) {
s->scfunc = gototext_void; s->scfunc = gototext_void;
......
...@@ -831,7 +831,7 @@ void backup_file_void(void); ...@@ -831,7 +831,7 @@ void backup_file_void(void);
void new_buffer_void(void); void new_buffer_void(void);
void backwards_void(void); void backwards_void(void);
void goto_dir_void(void); void goto_dir_void(void);
void no_replace_void(void); void flip_replace_void(void);
void flip_execute_void(void); void flip_execute_void(void);
#endif /* !PROTO_H */ #endif /* !PROTO_H */
...@@ -249,7 +249,7 @@ int search_init(bool replacing, bool use_answer) ...@@ -249,7 +249,7 @@ int search_init(bool replacing, bool use_answer)
backupstring = mallocstrcpy(backupstring, answer); backupstring = mallocstrcpy(backupstring, answer);
return 1; return 1;
#endif #endif
} else if (func == do_replace || func == no_replace_void) { } else if (func == do_replace || func == flip_replace_void) {
backupstring = mallocstrcpy(backupstring, answer); backupstring = mallocstrcpy(backupstring, answer);
return -2; /* Call the opposite search function. */ return -2; /* Call the opposite search function. */
} else if (func == do_gotolinecolumn_void) { } else if (func == do_gotolinecolumn_void) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment