From: Benno Schulenberg Date: Wed, 25 Mar 2015 19:33:00 +0000 (+0000) Subject: Allowing to rebind the linter when nano was configured with --disable-speller. X-Git-Tag: v2.4.1~35 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b455fa3a16f32a91813b253a53f2f65d5af28825;p=nano.git Allowing to rebind the linter when nano was configured with --disable-speller. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5162 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 55b17819..c4023baf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ formatter allows no interaction it needs no associated menu. * src/text.c (do_formatter): Remove unneeded statement -- nothing has changed the value of 'currmenu'. + * src/global.c (strtomenu), doc/man/nanorc.5: Allow rebinding the + linter when nano was configured with --disable-speller. 2015-03-23 Benno Schulenberg * src/text.c (do_alt_speller): Avoid the spell checker reporting diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index d0b6f6b5..a02415f0 100644 --- a/doc/man/nanorc.5 +++ b/doc/man/nanorc.5 @@ -418,6 +418,9 @@ Counts the number of words, lines and characters in the current buffer. Invokes a spell-checking program (or a linting program, if the current syntax highlighting defines one). .TP +.B linter +A synonym of \fBspeller\fR (for when the speller has not been configured). +.TP .B justify Justifies the current paragraph. .TP diff --git a/src/global.c b/src/global.c index 218ff293..df5a99fa 100644 --- a/src/global.c +++ b/src/global.c @@ -1311,6 +1311,8 @@ sc *strtosc(char *input) !strcasecmp(input, "speller")) s->scfunc = do_spell; #endif + else if (!strcasecmp(input, "linter")) + s->scfunc = do_linter; else if (!strcasecmp(input, "curpos") || !strcasecmp(input, "cursorpos")) s->scfunc = do_cursorpos_void;