nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit ebf9279f95f690dcba98babcc8bc2ecd99d48cfa
parent 304548ef826db3e9f3556a85a76d8ea7c58454f7
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 11 Mar 2020 19:47:21 +0100

tweaks: rename two more functions, to match the style of others

Diffstat:
Msrc/global.c | 16++++++++--------
Msrc/move.c | 4++--
Msrc/nano.c | 2+-
Msrc/proto.h | 4++--
Msrc/rcfile.c | 4++--
5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -930,9 +930,9 @@ void shortcut_init(void) add_to_funcs(to_next_block, MMAIN, N_("Next Block"), WITHORSANS(nextblock_gist), TOGETHER, VIEW); #ifdef ENABLE_JUSTIFY - add_to_funcs(do_para_begin_void, MMAIN|MGOTOLINE, + add_to_funcs(to_para_begin, MMAIN|MGOTOLINE, N_("Beg of Par"), WITHORSANS(parabegin_gist), TOGETHER, VIEW); - add_to_funcs(do_para_end_void, MMAIN|MGOTOLINE, + add_to_funcs(to_para_end, MMAIN|MGOTOLINE, N_("End of Par"), WITHORSANS(paraend_gist), BLANKAFTER, VIEW); #endif @@ -1263,10 +1263,10 @@ void shortcut_init(void) add_to_sclist(MMAIN, "M-7", 0, to_prev_block, 0); add_to_sclist(MMAIN, "M-8", 0, to_next_block, 0); #ifdef ENABLE_JUSTIFY - add_to_sclist(MMAIN, "M-(", 0, do_para_begin_void, 0); - add_to_sclist(MMAIN, "M-9", 0, do_para_begin_void, 0); - add_to_sclist(MMAIN, "M-)", 0, do_para_end_void, 0); - add_to_sclist(MMAIN, "M-0", 0, do_para_end_void, 0); + add_to_sclist(MMAIN, "M-(", 0, to_para_begin, 0); + add_to_sclist(MMAIN, "M-9", 0, to_para_begin, 0); + add_to_sclist(MMAIN, "M-)", 0, to_para_end, 0); + add_to_sclist(MMAIN, "M-0", 0, to_para_end, 0); #endif #ifndef NANO_TINY #ifdef ENABLE_UTF8 @@ -1360,8 +1360,8 @@ void shortcut_init(void) } #endif #ifdef ENABLE_JUSTIFY - add_to_sclist(MGOTOLINE, "^W", 0, do_para_begin_void, 0); - add_to_sclist(MGOTOLINE, "^O", 0, do_para_end_void, 0); + add_to_sclist(MGOTOLINE, "^W", 0, to_para_begin, 0); + add_to_sclist(MGOTOLINE, "^O", 0, to_para_end, 0); #endif add_to_sclist(MGOTOLINE, "^Y", 0, to_first_line, 0); add_to_sclist(MGOTOLINE, "^V", 0, to_last_line, 0); diff --git a/src/move.c b/src/move.c @@ -192,7 +192,7 @@ void do_para_end(linestruct **line) } /* Move up to first start of a paragraph before the current line. */ -void do_para_begin_void(void) +void to_para_begin(void) { linestruct *was_current = openfile->current; @@ -203,7 +203,7 @@ void do_para_begin_void(void) } /* Move down to just after the first found end of a paragraph. */ -void do_para_end_void(void) +void to_para_end(void) { linestruct *was_current = openfile->current; diff --git a/src/nano.c b/src/nano.c @@ -1436,7 +1436,7 @@ bool wanted_to_move(void (*func)(void)) func == do_home || func == do_end || func == to_prev_word || func == to_next_word || #ifdef ENABLE_JUSTIFY - func == do_para_begin_void || func == do_para_end_void || + func == to_para_begin || func == to_para_end || #endif func == to_prev_block || func == to_next_block || func == do_page_up || func == do_page_down || diff --git a/src/proto.h b/src/proto.h @@ -367,8 +367,8 @@ void do_page_down(void); #ifdef ENABLE_JUSTIFY void do_para_begin(linestruct **line); void do_para_end(linestruct **line); -void do_para_begin_void(void); -void do_para_end_void(void); +void to_para_begin(void); +void to_para_end(void); #endif void to_prev_block(void); void to_next_block(void); diff --git a/src/rcfile.c b/src/rcfile.c @@ -285,9 +285,9 @@ keystruct *strtosc(const char *input) else if (!strcmp(input, "fulljustify")) s->func = do_full_justify; else if (!strcmp(input, "beginpara")) - s->func = do_para_begin_void; + s->func = to_para_begin; else if (!strcmp(input, "endpara")) - s->func = do_para_end_void; + s->func = to_para_end; #endif #ifdef ENABLE_COMMENT else if (!strcmp(input, "comment"))