commit 95e77a9d5f1ef739a394c78f1db0df524756b5da
parent 776931a0b014831617802ec187fd919217832faf
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 30 Jun 2014 20:39:27 +0000
Renaming '*cut_till_end' to '*cut_till_eof', to reduce
confusion with CUT_TO_END, which is about end-of-line.
Patch by Mark Majeres.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
5 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-30 Mark Majeres <mark@engine12.com>
+ * src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to
+ 'cut_till_eof', and 'do_cut_till_end' to 'do_cut_till_eof', to
+ reduce confusion with CUT_TO_END, which is about end-of-line.
+
2014-06-30 Benno Schulenberg <bensberg@justemail.net>
* src/color.c (color_update): When there are no syntaxes, for example
with --ignorercfiles, do not try to find one, because that would lead
diff --git a/src/cut.c b/src/cut.c
@@ -120,11 +120,11 @@ void cut_to_eof(void)
/* Move text from the current filestruct into the cutbuffer. If
* copy_text is TRUE, copy the text back into the filestruct afterward.
- * If cut_till_end is TRUE, move all text from the current cursor
+ * If cut_till_eof is TRUE, move all text from the current cursor
* position to the end of the file into the cutbuffer. */
void do_cut_text(
#ifndef NANO_TINY
- bool copy_text, bool cut_till_end, bool undoing
+ bool copy_text, bool cut_till_eof, bool undoing
#else
void
#endif
@@ -173,8 +173,8 @@ void do_cut_text(
keep_cutbuffer = TRUE;
#ifndef NANO_TINY
- if (cut_till_end) {
- /* If cut_till_end is TRUE, move all text up to the end of the
+ if (cut_till_eof) {
+ /* If cut_till_eof is TRUE, move all text up to the end of the
* file into the cutbuffer. */
cut_to_eof();
} else if (openfile->mark_set) {
@@ -215,7 +215,7 @@ void do_cut_text(
if (!old_no_newlines)
UNSET(NO_NEWLINES);
} else if (!undoing)
- update_undo(cut_till_end ? CUT_EOF : CUT);
+ update_undo(cut_till_eof ? CUT_EOF : CUT);
/* Leave the text in the cutbuffer, and mark the file as
* modified. */
@@ -268,7 +268,7 @@ void do_copy_text(void)
}
/* Cut from the current cursor position to the end of the file. */
-void do_cut_till_end(void)
+void do_cut_till_eof(void)
{
add_undo(CUT_EOF);
do_cut_text(FALSE, TRUE, FALSE);
diff --git a/src/global.c b/src/global.c
@@ -578,7 +578,7 @@ void shortcut_init(void)
const char *nano_backspace_msg =
N_("Delete the character to the left of the cursor");
#ifndef NANO_TINY
- const char *nano_cut_till_end_msg =
+ const char *nano_cut_till_eof_msg =
N_("Cut from the cursor position to the end of the file");
#endif
#ifndef DISABLE_JUSTIFY
@@ -876,8 +876,8 @@ void shortcut_init(void)
NOVIEW);
#ifndef NANO_TINY
- add_to_funcs(do_cut_till_end, MMAIN,
- N_("CutTillEnd"), IFSCHELP(nano_cut_till_end_msg), TRUE, NOVIEW);
+ add_to_funcs(do_cut_till_eof, MMAIN,
+ N_("CutTillEnd"), IFSCHELP(nano_cut_till_eof_msg), TRUE, NOVIEW);
#endif
#ifndef DISABLE_JUSTIFY
@@ -1069,7 +1069,7 @@ void shortcut_init(void)
#endif
add_to_sclist(MMOST, "M-V", do_verbatim_input, 0);
#ifndef NANO_TINY
- add_to_sclist(MMAIN, "M-T", do_cut_till_end, 0);
+ add_to_sclist(MMAIN, "M-T", do_cut_till_eof, 0);
add_to_sclist(MMAIN, "M-D", do_wordlinechar_count, 0);
#endif
#ifndef DISABLE_JUSTIFY
@@ -1283,7 +1283,7 @@ sc *strtosc(char *input)
s->scfunc = do_uncut_text;
#ifndef NANO_TINY
else if (!strcasecmp(input, "cutrestoffile"))
- s->scfunc = do_cut_till_end;
+ s->scfunc = do_cut_till_eof;
else if (!strcasecmp(input, "copytext"))
s->scfunc = do_copy_text;
else if (!strcasecmp(input, "mark"))
diff --git a/src/nano.c b/src/nano.c
@@ -1690,7 +1690,7 @@ int do_input(bool allow_funcs)
* cutting or copying text, remember this. */
if (s->scfunc == do_cut_text_void
#ifndef NANO_TINY
- || s->scfunc == do_copy_text || s->scfunc == do_cut_till_end
+ || s->scfunc == do_copy_text || s->scfunc == do_cut_till_eof
#endif
)
preserve = TRUE;
diff --git a/src/proto.h b/src/proto.h
@@ -259,7 +259,7 @@ void cut_to_eof(void);
#endif
void do_cut_text(
#ifndef NANO_TINY
- bool copy_text, bool cut_till_end, bool undoing
+ bool copy_text, bool cut_till_eof, bool undoing
#else
void
#endif
@@ -267,7 +267,7 @@ void do_cut_text(
void do_cut_text_void(void);
#ifndef NANO_TINY
void do_copy_text(void);
-void do_cut_till_end(void);
+void do_cut_till_eof(void);
#endif
void do_uncut_text(void);