Treating the formatter like a speller,
to fix compilation with --disable-speller. This fixes Savannah bug #44607. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5168 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
52d7d5f55a
commit
14a9c8aa0b
|
@ -8,6 +8,8 @@
|
||||||
a Replace All with *lots* of occurrences.
|
a Replace All with *lots* of occurrences.
|
||||||
* src/{color,global,nano,text,utils}.c: Normalize some whitespace.
|
* src/{color,global,nano,text,utils}.c: Normalize some whitespace.
|
||||||
* src/global.c (strtosc): The linter is only available when colour is.
|
* src/global.c (strtosc): The linter is only available when colour is.
|
||||||
|
* src/global.c, src/text.c: Treat the formatter like a speller, to fix
|
||||||
|
compilation with --disable-speller. Fixes Savannah bug #44607.
|
||||||
|
|
||||||
2015-03-25 Benno Schulenberg <bensberg@justemail.net>
|
2015-03-25 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* doc/syntax/debian.nanorc: Slightly widen and relax the header regex.
|
* doc/syntax/debian.nanorc: Slightly widen and relax the header regex.
|
||||||
|
|
10
src/global.c
10
src/global.c
|
@ -639,8 +639,10 @@ void shortcut_init(void)
|
||||||
const char *nano_lint_msg = N_("Invoke the linter, if available");
|
const char *nano_lint_msg = N_("Invoke the linter, if available");
|
||||||
const char *nano_prevlint_msg = N_("Go to previous linter msg");
|
const char *nano_prevlint_msg = N_("Go to previous linter msg");
|
||||||
const char *nano_nextlint_msg = N_("Go to next linter msg");
|
const char *nano_nextlint_msg = N_("Go to next linter msg");
|
||||||
|
#ifndef DISABLE_SPELLER
|
||||||
const char *nano_formatter_msg = N_("Invoke formatter, if available");
|
const char *nano_formatter_msg = N_("Invoke formatter, if available");
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* !DISABLE_HELP */
|
#endif /* !DISABLE_HELP */
|
||||||
|
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
|
@ -736,9 +738,11 @@ void shortcut_init(void)
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
add_to_funcs(do_linter, MMAIN,
|
add_to_funcs(do_linter, MMAIN,
|
||||||
N_("To Linter"), IFSCHELP(nano_lint_msg), TOGETHER, NOVIEW);
|
N_("To Linter"), IFSCHELP(nano_lint_msg), TOGETHER, NOVIEW);
|
||||||
|
#ifndef DISABLE_SPELLER
|
||||||
add_to_funcs(do_formatter, MMAIN,
|
add_to_funcs(do_formatter, MMAIN,
|
||||||
N_("Formatter"), IFSCHELP(nano_formatter_msg), BLANKAFTER, NOVIEW);
|
N_("Formatter"), IFSCHELP(nano_formatter_msg), BLANKAFTER, NOVIEW);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
add_to_funcs(case_sens_void, MWHEREIS|MREPLACE,
|
add_to_funcs(case_sens_void, MWHEREIS|MREPLACE,
|
||||||
|
@ -1006,12 +1010,14 @@ void shortcut_init(void)
|
||||||
#ifndef DISABLE_SPELLER
|
#ifndef DISABLE_SPELLER
|
||||||
add_to_sclist(MMAIN, "^T", do_spell, 0);
|
add_to_sclist(MMAIN, "^T", do_spell, 0);
|
||||||
add_to_sclist(MMAIN, "F12", do_spell, 0);
|
add_to_sclist(MMAIN, "F12", do_spell, 0);
|
||||||
|
#ifndef DISABLE_COLOR
|
||||||
|
add_to_sclist(MMAIN, "^T", do_formatter, 0);
|
||||||
|
add_to_sclist(MMAIN, "F12", do_formatter, 0);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
add_to_sclist(MMAIN, "^T", do_linter, 0);
|
add_to_sclist(MMAIN, "^T", do_linter, 0);
|
||||||
add_to_sclist(MMAIN, "F12", do_linter, 0);
|
add_to_sclist(MMAIN, "F12", do_linter, 0);
|
||||||
add_to_sclist(MMAIN, "^T", do_formatter, 0);
|
|
||||||
add_to_sclist(MMAIN, "F12", do_formatter, 0);
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MMAIN, "^C", do_cursorpos_void, 0);
|
add_to_sclist(MMAIN, "^C", do_cursorpos_void, 0);
|
||||||
|
|
|
@ -3223,6 +3223,7 @@ free_lints_and_return:
|
||||||
lint_cleanup();
|
lint_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_SPELLER
|
||||||
/* Run a formatter for the given syntax.
|
/* Run a formatter for the given syntax.
|
||||||
* Expects the formatter to be non-interactive and
|
* Expects the formatter to be non-interactive and
|
||||||
* operate on a file in-place, which we'll pass it
|
* operate on a file in-place, which we'll pass it
|
||||||
|
@ -3370,7 +3371,7 @@ void do_formatter(void)
|
||||||
|
|
||||||
statusbar(finalstatus);
|
statusbar(finalstatus);
|
||||||
}
|
}
|
||||||
|
#endif /* !DISABLE_SPELLER */
|
||||||
#endif /* !DISABLE_COLOR */
|
#endif /* !DISABLE_COLOR */
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
|
Loading…
Reference in New Issue