commit a0f66c0691940afe688028b64a858de84c61d07e
parent ce0ea44596d5b90cb84c333168ea48cd68b72198
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 23 Jun 2014 18:30:35 +0000
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
Diffstat:
6 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,6 +1,9 @@
2014-06-23 Benno Schulenberg <bensberg@justemail.net>
* 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.
+ * 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>
* src/browser.c (parse_browser_input), src/help.c (parse_help_input):
diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5
@@ -514,8 +514,8 @@ Shows the previous history entry in the prompt menus (e.g. search).
.B nexthistory
Shows the next history entry in the prompt menus (e.g. search).
.TP
-.B dontreplace
-Switches back to searching instead of replacing.
+.B flipreplace
+Toggles between searching for something and replacing something.
.TP
.B flipexecute
Toggles between inserting a file and executing a command.
diff --git a/doc/texinfo/nano.texi b/doc/texinfo/nano.texi
@@ -1040,8 +1040,8 @@ Shows the previous history entry in the prompt menus (e.g. search).
@item nexthistory
Shows the next history entry in the prompt menus (e.g. search).
-@item dontreplace
-Switches back to searching instead of replacing.
+@item flipreplace
+Toggles between searching for something and replacing something.
@item flipexecute
Toggles between inserting a file and executing a command.
diff --git a/src/global.c b/src/global.c
@@ -267,7 +267,7 @@ void backup_file_void(void)
void new_buffer_void(void)
{
}
-void no_replace_void(void)
+void flip_replace_void(void)
{
}
void flip_execute_void(void)
@@ -741,10 +741,10 @@ void shortcut_init(void)
N_("Backwards"), IFSCHELP(nano_reverse_msg), FALSE, VIEW);
#endif
- add_to_funcs(do_replace, MWHEREIS,
+ add_to_funcs(flip_replace_void, MWHEREIS,
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);
#ifndef DISABLE_JUSTIFY
@@ -1115,8 +1115,7 @@ void shortcut_init(void)
add_to_sclist(MWHEREIS|MREPLACE, "M-C", case_sens_void, 0, FALSE);
#endif
add_to_sclist(MWHEREIS|MREPLACE, "M-R", regexp_void, 0, FALSE);
- add_to_sclist(MWHEREIS, "^R", do_replace, 0, FALSE);
- add_to_sclist(MREPLACE, "^R", no_replace_void, 0, FALSE);
+ add_to_sclist(MWHEREIS|MREPLACE, "^R", flip_replace_void, 0, FALSE);
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);
#ifndef DISABLE_JUSTIFY
@@ -1474,8 +1473,9 @@ sc *strtosc(char *input)
s->scfunc = backwards_void;
s->execute = FALSE;
#endif
- } else if (!strcasecmp(input, "dontreplace")) {
- s->scfunc = no_replace_void;
+ } else if (!strcasecmp(input, "flipreplace") ||
+ !strcasecmp(input, "dontreplace")) {
+ s->scfunc = flip_replace_void;
s->execute = FALSE;
} else if (!strcasecmp(input, "gototext")) {
s->scfunc = gototext_void;
diff --git a/src/proto.h b/src/proto.h
@@ -831,7 +831,7 @@ void backup_file_void(void);
void new_buffer_void(void);
void backwards_void(void);
void goto_dir_void(void);
-void no_replace_void(void);
+void flip_replace_void(void);
void flip_execute_void(void);
#endif /* !PROTO_H */
diff --git a/src/search.c b/src/search.c
@@ -249,7 +249,7 @@ int search_init(bool replacing, bool use_answer)
backupstring = mallocstrcpy(backupstring, answer);
return 1;
#endif
- } else if (func == do_replace || func == no_replace_void) {
+ } else if (func == do_replace || func == flip_replace_void) {
backupstring = mallocstrcpy(backupstring, answer);
return -2; /* Call the opposite search function. */
} else if (func == do_gotolinecolumn_void) {