diff --git a/src/global.c b/src/global.c index 9da29cbd..29f38601 100644 --- a/src/global.c +++ b/src/global.c @@ -1114,11 +1114,9 @@ void shortcut_init(void) #ifdef ENABLE_SPELLER add_to_sclist(MMAIN, "^T", 0, do_spell, 0); add_to_sclist(MMAIN, "F12", 0, do_spell, 0); -#else -#ifdef ENABLE_COLOR - add_to_sclist(MMAIN, "^T", 0, do_linter, 0); - add_to_sclist(MMAIN, "F12", 0, do_linter, 0); #endif +#ifdef ENABLE_COLOR + add_to_sclist(MMAIN, "M-B", 0, do_linter, 0); #endif add_to_sclist(MMAIN, "^C", 0, do_cursorpos_void, 0); add_to_sclist(MMAIN, "F11", 0, do_cursorpos_void, 0); @@ -1358,26 +1356,6 @@ void shortcut_init(void) #endif } -#if defined(ENABLE_COLOR) && defined(ENABLE_SPELLER) -/* Assign one function's shortcuts to another function. */ -void replace_scs_for(void (*oldfunc)(void), void (*newfunc)(void)) -{ - for (sc *s = sclist; s != NULL; s = s->next) - if (s->func == oldfunc) - s->func = newfunc; -} - -void set_linter_shortcut(void) -{ - replace_scs_for(do_spell, do_linter); -} - -void set_speller_shortcut(void) -{ - replace_scs_for(do_linter, do_spell); -} -#endif /* ENABLE_COLOR && ENABLE_SPELLER */ - const subnfunc *sctofunc(const sc *s) { subnfunc *f = allfuncs; diff --git a/src/proto.h b/src/proto.h index 0b93ed64..65b98e1f 100644 --- a/src/proto.h +++ b/src/proto.h @@ -322,10 +322,6 @@ int keycode_from_string(const char *keystring); void assign_keyinfo(sc *s, const char *keystring, const int keycode); void print_sclist(void); void shortcut_init(void); -#ifdef ENABLE_COLOR -void set_linter_shortcut(void); -void set_speller_shortcut(void); -#endif const subnfunc *sctofunc(const sc *s); const char *flagtostr(int flag); #ifdef ENABLE_NANORC diff --git a/src/winio.c b/src/winio.c index ab04170b..838783c1 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3338,13 +3338,6 @@ void total_refresh(void) * portion of the window. */ void display_main_list(void) { -#if defined(ENABLE_COLOR) && defined(ENABLE_SPELLER) - if (openfile->syntax && openfile->syntax->linter) - set_linter_shortcut(); - else - set_speller_shortcut(); -#endif - bottombars(MMAIN); }