again correctly. This fixes the second part of Savannah bug #42093.
* src/global.c (shortcut_init, strtosc): Do not define nor accept
shortcuts for functions that are disabled.
+ * src/global.c (shortcut_init, strtosc): Define shortcut for the linter
+ when speller is disabled, and fix compilation with --disable-speller.
2014-05-06 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Let makeinfo figure out the node pointers.
nano_justify_msg, FALSE, NOVIEW);
#endif
- /* If we're using restricted mode, spell checking is disabled
- * because it allows reading from or writing to files not specified
- * on the command line. */
#ifndef DISABLE_SPELLER
add_to_funcs(do_spell, MMAIN, spell_tag, IFSCHELP(nano_spell_msg),
FALSE, NOVIEW);
#ifndef DISABLE_SPELLER
add_to_sclist(MMAIN, "^T", do_spell, 0, TRUE);
add_to_sclist(MMAIN, "F12", do_spell, 0, TRUE);
+#else
+#ifndef DISABLE_COLOR
+ add_to_sclist(MMAIN, "^T", do_linter, 0, TRUE);
+ add_to_sclist(MMAIN, "F12", do_linter, 0, TRUE);
+#endif
#endif
add_to_sclist(MMAIN, "^C", do_cursorpos_void, 0, TRUE);
add_to_sclist(MMAIN, "F11", do_cursorpos_void, 0, TRUE);
s->scfunc = do_copy_text;
else if (!strcasecmp(input, "mark"))
s->scfunc = do_mark;
+#endif
+#ifndef DISABLE_SPELLER
else if (!strcasecmp(input, "tospell") ||
!strcasecmp(input, "speller"))
s->scfunc = do_spell;