f->menus = menus;
f->desc = desc;
f->viewok = viewok;
-#ifndef NANO_TINY
+#ifndef DISABLE_HELP
f->help = help;
f->blank_after = blank_after;
#endif
const char *insert_file_msg = N_("Insert File");
const char *go_to_line_msg = N_("Go To Line");
+#ifndef DISABLE_JUSTIFY
+ const char *nano_justify_msg = N_("Justify the current paragraph");
+#endif
#ifndef DISABLE_HELP
/* TRANSLATORS: The next long series of strings are shortcut descriptions;
* they are best kept shorter than 56 characters, but may be longer. */
;
const char *nano_writeout_msg =
N_("Write the current file to disk");
-#ifndef DISABLE_JUSTIFY
- const char *nano_justify_msg = N_("Justify the current paragraph");
-#endif
const char *nano_insert_msg =
N_("Insert another file into the current one");
const char *nano_whereis_msg =
free(f);
}
-#ifndef DISABLE_HELP
- add_to_funcs(do_help_void, MALL, get_help_msg, nano_help_msg,
+ add_to_funcs(do_help_void, MALL, get_help_msg, IFSCHELP(nano_help_msg),
FALSE, VIEW);
-#endif
add_to_funcs((void *) cancel_msg,
(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR|MYESNO),
#ifndef DISABLE_SPELLER
if (!ISSET(RESTRICTED))
/* TRANSLATORS: Try to keep this at most 10 characters. */
- add_to_funcs(do_spell, MMAIN, N_("To Spell"), nano_spell_msg,
+ add_to_funcs(do_spell, MMAIN, N_("To Spell"), IFSCHELP(nano_spell_msg),
TRUE, NOVIEW);
#endif
#ifndef NANO_TINY
add_to_funcs(do_mark, MMAIN, N_("Mark Text"),
- nano_mark_msg, FALSE, VIEW);
+ IFSCHELP(nano_mark_msg), FALSE, VIEW);
add_to_funcs(do_research, (MMAIN|MBROWSER), whereis_next_msg,
- nano_whereis_next_msg, TRUE, VIEW);
+ IFSCHELP(nano_whereis_next_msg), TRUE, VIEW);
add_to_funcs(do_copy_text, MMAIN, N_("Copy Text"),
- nano_copy_msg, FALSE, NOVIEW);
+ IFSCHELP(nano_copy_msg), FALSE, NOVIEW);
add_to_funcs(do_indent_void, MMAIN, N_("Indent Text"),
- nano_indent_msg, FALSE, NOVIEW);
+ IFSCHELP(nano_indent_msg), FALSE, NOVIEW);
add_to_funcs(do_unindent, MMAIN, N_("Unindent Text"),
- nano_unindent_msg, FALSE, NOVIEW);
+ IFSCHELP(nano_unindent_msg), FALSE, NOVIEW);
add_to_funcs(do_undo, MMAIN, N_("Undo"),
- nano_undo_msg, FALSE, NOVIEW);
+ IFSCHELP(nano_undo_msg), FALSE, NOVIEW);
add_to_funcs(do_redo, MMAIN, N_("Redo"),
- nano_redo_msg, TRUE, NOVIEW);
+ IFSCHELP(nano_redo_msg), TRUE, NOVIEW);
#endif
#ifndef NANO_TINY
add_to_funcs(do_next_word_void, MMAIN, N_("Next Word"),
- nano_nextword_msg, FALSE, VIEW);
+ IFSCHELP(nano_nextword_msg), FALSE, VIEW);
add_to_funcs(do_prev_word_void, MMAIN, N_("Prev Word"),
- nano_prevword_msg, FALSE, VIEW);
+ IFSCHELP(nano_prevword_msg), FALSE, VIEW);
#endif
add_to_funcs(do_up_void, (MMAIN|MHELP|MBROWSER), N_("Prev Line"),
#ifndef DISABLE_JUSTIFY
add_to_funcs(do_para_begin_void, (MMAIN|MWHEREIS), beg_of_par_msg,
- nano_parabegin_msg, FALSE, VIEW);
+ IFSCHELP(nano_parabegin_msg), FALSE, VIEW);
add_to_funcs(do_para_end_void, (MMAIN|MWHEREIS), end_of_par_msg,
- nano_paraend_msg, FALSE, VIEW);
+ IFSCHELP(nano_paraend_msg), FALSE, VIEW);
#endif
#ifndef NANO_TINY
add_to_funcs(do_find_bracket, MMAIN, _("Find Other Bracket"),
- nano_bracket_msg, FALSE, VIEW);
+ IFSCHELP(nano_bracket_msg), FALSE, VIEW);
add_to_funcs(do_scroll_up, MMAIN, N_("Scroll Up"),
- nano_scrollup_msg, FALSE, VIEW);
+ IFSCHELP(nano_scrollup_msg), FALSE, VIEW);
add_to_funcs(do_scroll_down, MMAIN, N_("Scroll Down"),
- nano_scrolldown_msg, FALSE, VIEW);
+ IFSCHELP(nano_scrolldown_msg), FALSE, VIEW);
#endif
#ifdef ENABLE_MULTIBUFFER
#ifndef NANO_TINY
add_to_funcs(do_cut_till_end, MMAIN, N_("CutTillEnd"),
- nano_cut_till_end_msg, TRUE, NOVIEW);
+ IFSCHELP(nano_cut_till_end_msg), TRUE, NOVIEW);
#endif
add_to_funcs(xon_complaint, MMAIN, "", "", FALSE, VIEW);
#ifndef DISABLE_JUSTIFY
add_to_funcs(do_full_justify, (MMAIN|MWHEREIS), fulljstify_msg,
- nano_fulljustify_msg, FALSE, NOVIEW);
+ IFSCHELP(nano_fulljustify_msg), FALSE, NOVIEW);
#endif
#ifndef NANO_TINY
add_to_funcs(do_wordlinechar_count, MMAIN, N_("Word Count"),
- nano_wordcount_msg, FALSE, VIEW);
+ IFSCHELP(nano_wordcount_msg), FALSE, VIEW);
#endif
add_to_funcs(total_refresh, (MMAIN|MHELP), refresh_msg,
#ifndef NANO_TINY
add_to_funcs((void *) case_sens_msg,
(MWHEREIS|MREPLACE|MWHEREISFILE),
- case_sens_msg, nano_case_msg, FALSE, VIEW);
+ case_sens_msg, IFSCHELP(nano_case_msg), FALSE, VIEW);
add_to_funcs((void *) backwards_msg,
(MWHEREIS|MREPLACE|MWHEREISFILE),
- backwards_msg, nano_reverse_msg, FALSE, VIEW);
+ backwards_msg, IFSCHELP(nano_reverse_msg), FALSE, VIEW);
#endif
#ifdef HAVE_REGEX_H
#ifndef NANO_TINY
add_to_funcs((void *) prev_history_msg,
(MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE),
- prev_history_msg, nano_prev_history_msg, FALSE, VIEW);
+ prev_history_msg, IFSCHELP(nano_prev_history_msg), FALSE, VIEW);
add_to_funcs((void *) next_history_msg,
(MWHEREIS|MREPLACE|MREPLACE2|MWHEREISFILE),
- next_history_msg, nano_next_history_msg, FALSE, VIEW);
+ next_history_msg, IFSCHELP(nano_next_history_msg), FALSE, VIEW);
#endif
add_to_funcs((void *) no_replace_msg, MREPLACE,
if (!ISSET(RESTRICTED))
add_to_funcs((void *) to_files_msg,
(MGOTOLINE|MINSERTFILE),
- to_files_msg, nano_tofiles_msg, FALSE, VIEW);
+ to_files_msg, IFSCHELP(nano_tofiles_msg), FALSE, VIEW);
#endif
#ifndef NANO_TINY
* backups are disabled. */
if (!ISSET(RESTRICTED))
add_to_funcs((void *) dos_format_msg, MWRITEFILE,
- dos_format_msg, nano_dos_msg, FALSE, NOVIEW);
+ dos_format_msg, IFSCHELP(nano_dos_msg), FALSE, NOVIEW);
if (!ISSET(RESTRICTED))
add_to_funcs((void *) mac_format_msg, MWRITEFILE,
- mac_format_msg, nano_mac_msg, FALSE, NOVIEW);
+ mac_format_msg, IFSCHELP(nano_mac_msg), FALSE, NOVIEW);
if (!ISSET(RESTRICTED))
add_to_funcs((void *) append_msg, MWRITEFILE,
- append_msg, nano_append_msg, FALSE, NOVIEW);
+ append_msg, IFSCHELP(nano_append_msg), FALSE, NOVIEW);
if (!ISSET(RESTRICTED))
add_to_funcs((void *) prepend_msg, MWRITEFILE,
- prepend_msg, nano_prepend_msg, FALSE, NOVIEW);
+ prepend_msg, IFSCHELP(nano_prepend_msg), FALSE, NOVIEW);
if (!ISSET(RESTRICTED))
add_to_funcs((void *) backup_file_msg, MWRITEFILE,
- backup_file_msg, nano_backup_msg, FALSE, NOVIEW);
+ backup_file_msg, IFSCHELP(nano_backup_msg), FALSE, NOVIEW);
#endif
#ifndef NANO_TINY
* It's useless since inserting files is disabled. */
if (!ISSET(RESTRICTED))
add_to_funcs((void *) ext_cmd_msg, MINSERTFILE,
- ext_cmd_msg, nano_execute_msg, FALSE, NOVIEW);
+ ext_cmd_msg, IFSCHELP(nano_execute_msg), FALSE, NOVIEW);
#ifdef ENABLE_MULTIBUFFER
/* If we're using restricted mode, the multibuffer toggle is
* disabled. It's useless since inserting files is disabled. */
if (!ISSET(RESTRICTED))
add_to_funcs((void *) new_buffer_msg, MINSERTFILE,
- new_buffer_msg, nano_multibuffer_msg, FALSE, NOVIEW);
+ new_buffer_msg, IFSCHELP(nano_multibuffer_msg), FALSE, NOVIEW);
#endif
add_to_funcs((void *) insert_file_msg, MEXTCMD,
#ifdef ENABLE_MULTIBUFFER
add_to_funcs((void *) new_buffer_msg, MEXTCMD,
- new_buffer_msg, nano_multibuffer_msg, FALSE, NOVIEW);
+ new_buffer_msg, IFSCHELP(nano_multibuffer_msg), FALSE, NOVIEW);
#endif
#endif
add_to_funcs((void *) first_file_msg,
(MBROWSER|MWHEREISFILE),
- first_file_msg, nano_firstfile_msg, FALSE, VIEW);
+ first_file_msg, IFSCHELP(nano_firstfile_msg), FALSE, VIEW);
add_to_funcs((void *) last_file_msg,
(MBROWSER|MWHEREISFILE),
- last_file_msg, nano_lastfile_msg, FALSE, VIEW);
+ last_file_msg, IFSCHELP(nano_lastfile_msg), FALSE, VIEW);
add_to_funcs((void *) goto_dir_msg, MBROWSER,
- goto_dir_msg, nano_gotodir_msg, FALSE, VIEW);
+ goto_dir_msg, IFSCHELP(nano_gotodir_msg), FALSE, VIEW);
#endif
currmenu = MMAIN;
-#ifndef NANO_TINY
add_to_sclist(MALL, "^G", do_help_void, 0, TRUE);
add_to_sclist(MALL, "F1", do_help_void, 0, TRUE);
-#endif
add_to_sclist(MMAIN|MHELP|MBROWSER, "^X", do_exit, 0, TRUE);
add_to_sclist(MMAIN|MHELP|MBROWSER, "F2", do_exit, 0, TRUE);
add_to_sclist(MMAIN, "^_", do_gotolinecolumn_void, 0, TRUE);