build: do not let --disable-speller exclude also the formatter code
In the past, when Speller and Linter and Formatter were all bound
to ^T (later ones taking priority), it was easier to exclude also
the formatter code when --disable-speller was used. But since the
formatter was reintroduced (in commit 34170611
) and bound to its
own keystroke (M-F), this is no longer the case.
master
parent
2579b105da
commit
8089f5ad54
|
@ -721,11 +721,9 @@ void shortcut_init(void)
|
|||
const char *lint_gist = N_("Invoke the linter, if available");
|
||||
const char *prevlint_gist = N_("Go to previous linter msg");
|
||||
const char *nextlint_gist = N_("Go to next linter msg");
|
||||
#ifdef ENABLE_SPELLER
|
||||
const char *formatter_gist =
|
||||
N_("Invoke a program to format/arrange/manipulate the buffer");
|
||||
#endif
|
||||
#endif
|
||||
#endif /* ENABLE_HELP */
|
||||
|
||||
#ifdef ENABLE_HELP
|
||||
|
@ -1043,13 +1041,11 @@ void shortcut_init(void)
|
|||
if (!ISSET(RESTRICTED)) {
|
||||
add_to_funcs(do_linter, MMAIN,
|
||||
N_("Linter"), WITHORSANS(lint_gist), TOGETHER, NOVIEW);
|
||||
#ifdef ENABLE_SPELLER
|
||||
add_to_funcs(do_formatter, MMAIN,
|
||||
N_("Formatter"), WITHORSANS(formatter_gist), BLANKAFTER, NOVIEW);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* NANO_TINY */
|
||||
add_to_funcs(do_savefile, MMAIN,
|
||||
N_("Save"), WITHORSANS(savefile_gist), BLANKAFTER, NOVIEW);
|
||||
|
||||
|
@ -1168,9 +1164,7 @@ void shortcut_init(void)
|
|||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
add_to_sclist(MMAIN, "M-B", 0, do_linter, 0);
|
||||
#ifdef ENABLE_SPELLER
|
||||
add_to_sclist(MMAIN, "M-F", 0, do_formatter, 0);
|
||||
#endif
|
||||
#endif
|
||||
add_to_sclist(MMAIN, "^C", 0, do_cursorpos_void, 0);
|
||||
add_to_sclist(MMAIN, "^_", 0, do_gotolinecolumn_void, 0);
|
||||
|
|
|
@ -272,10 +272,8 @@ keystruct *strtosc(const char *input)
|
|||
#ifdef ENABLE_COLOR
|
||||
else if (!strcmp(input, "linter"))
|
||||
s->func = do_linter;
|
||||
#ifdef ENABLE_SPELLER
|
||||
else if (!strcmp(input, "formatter"))
|
||||
s->func = do_formatter;
|
||||
#endif
|
||||
#endif
|
||||
else if (!strcmp(input, "curpos"))
|
||||
s->func = do_cursorpos_void;
|
||||
|
|
|
@ -2870,7 +2870,6 @@ void do_linter(void)
|
|||
titlebar(NULL);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SPELLER
|
||||
/* Run a manipulation program on the contents of the buffer. */
|
||||
void do_formatter(void)
|
||||
{
|
||||
|
@ -2906,7 +2905,6 @@ void do_formatter(void)
|
|||
unlink(temp_name);
|
||||
free(temp_name);
|
||||
}
|
||||
#endif /* ENABLE_SPELLER */
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
#ifndef NANO_TINY
|
||||
|
|
Loading…
Reference in New Issue