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
master
Benno Schulenberg 2014-06-30 20:39:27 +00:00
parent 776931a0b0
commit 95e77a9d5f
5 changed files with 19 additions and 14 deletions

View File

@ -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> 2014-06-30 Benno Schulenberg <bensberg@justemail.net>
* src/color.c (color_update): When there are no syntaxes, for example * src/color.c (color_update): When there are no syntaxes, for example
with --ignorercfiles, do not try to find one, because that would lead with --ignorercfiles, do not try to find one, because that would lead

View File

@ -120,11 +120,11 @@ void cut_to_eof(void)
/* Move text from the current filestruct into the cutbuffer. If /* Move text from the current filestruct into the cutbuffer. If
* copy_text is TRUE, copy the text back into the filestruct afterward. * 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. */ * position to the end of the file into the cutbuffer. */
void do_cut_text( void do_cut_text(
#ifndef NANO_TINY #ifndef NANO_TINY
bool copy_text, bool cut_till_end, bool undoing bool copy_text, bool cut_till_eof, bool undoing
#else #else
void void
#endif #endif
@ -173,8 +173,8 @@ void do_cut_text(
keep_cutbuffer = TRUE; keep_cutbuffer = TRUE;
#ifndef NANO_TINY #ifndef NANO_TINY
if (cut_till_end) { if (cut_till_eof) {
/* If cut_till_end is TRUE, move all text up to the end of the /* If cut_till_eof is TRUE, move all text up to the end of the
* file into the cutbuffer. */ * file into the cutbuffer. */
cut_to_eof(); cut_to_eof();
} else if (openfile->mark_set) { } else if (openfile->mark_set) {
@ -215,7 +215,7 @@ void do_cut_text(
if (!old_no_newlines) if (!old_no_newlines)
UNSET(NO_NEWLINES); UNSET(NO_NEWLINES);
} else if (!undoing) } 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 /* Leave the text in the cutbuffer, and mark the file as
* modified. */ * modified. */
@ -268,7 +268,7 @@ void do_copy_text(void)
} }
/* Cut from the current cursor position to the end of the file. */ /* 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); add_undo(CUT_EOF);
do_cut_text(FALSE, TRUE, FALSE); do_cut_text(FALSE, TRUE, FALSE);

View File

@ -578,7 +578,7 @@ void shortcut_init(void)
const char *nano_backspace_msg = const char *nano_backspace_msg =
N_("Delete the character to the left of the cursor"); N_("Delete the character to the left of the cursor");
#ifndef NANO_TINY #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"); N_("Cut from the cursor position to the end of the file");
#endif #endif
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
@ -876,8 +876,8 @@ void shortcut_init(void)
NOVIEW); NOVIEW);
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_funcs(do_cut_till_end, MMAIN, add_to_funcs(do_cut_till_eof, MMAIN,
N_("CutTillEnd"), IFSCHELP(nano_cut_till_end_msg), TRUE, NOVIEW); N_("CutTillEnd"), IFSCHELP(nano_cut_till_eof_msg), TRUE, NOVIEW);
#endif #endif
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
@ -1069,7 +1069,7 @@ void shortcut_init(void)
#endif #endif
add_to_sclist(MMOST, "M-V", do_verbatim_input, 0); add_to_sclist(MMOST, "M-V", do_verbatim_input, 0);
#ifndef NANO_TINY #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); add_to_sclist(MMAIN, "M-D", do_wordlinechar_count, 0);
#endif #endif
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
@ -1283,7 +1283,7 @@ sc *strtosc(char *input)
s->scfunc = do_uncut_text; s->scfunc = do_uncut_text;
#ifndef NANO_TINY #ifndef NANO_TINY
else if (!strcasecmp(input, "cutrestoffile")) else if (!strcasecmp(input, "cutrestoffile"))
s->scfunc = do_cut_till_end; s->scfunc = do_cut_till_eof;
else if (!strcasecmp(input, "copytext")) else if (!strcasecmp(input, "copytext"))
s->scfunc = do_copy_text; s->scfunc = do_copy_text;
else if (!strcasecmp(input, "mark")) else if (!strcasecmp(input, "mark"))

View File

@ -1690,7 +1690,7 @@ int do_input(bool allow_funcs)
* cutting or copying text, remember this. */ * cutting or copying text, remember this. */
if (s->scfunc == do_cut_text_void if (s->scfunc == do_cut_text_void
#ifndef NANO_TINY #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 #endif
) )
preserve = TRUE; preserve = TRUE;

View File

@ -259,7 +259,7 @@ void cut_to_eof(void);
#endif #endif
void do_cut_text( void do_cut_text(
#ifndef NANO_TINY #ifndef NANO_TINY
bool copy_text, bool cut_till_end, bool undoing bool copy_text, bool cut_till_eof, bool undoing
#else #else
void void
#endif #endif
@ -267,7 +267,7 @@ void do_cut_text(
void do_cut_text_void(void); void do_cut_text_void(void);
#ifndef NANO_TINY #ifndef NANO_TINY
void do_copy_text(void); void do_copy_text(void);
void do_cut_till_end(void); void do_cut_till_eof(void);
#endif #endif
void do_uncut_text(void); void do_uncut_text(void);