~ubuntu-branches/ubuntu/raring/nano/raring

« back to all changes in this revision

Viewing changes to src/global.c

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach
  • Date: 2006-10-26 01:45:48 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20061026014548-xp2o3hvubmmlub4n
Tags: 1.9.99pre3-1
* The "Catrals per tot arreu" release.
* New upstream prerelease.
* debian/nanorc: sync with nanorc.sample.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: global.c,v 1.208 2006/06/08 02:37:45 dolorous Exp $ */
 
1
/* $Id: global.c,v 1.218 2006/08/25 19:26:48 dolorous Exp $ */
2
2
/**************************************************************************
3
3
 *   global.c                                                             *
4
4
 *                                                                        *
54
54
         * number of nano, the name of the current file, and whether the
55
55
         * current file has been modified. */
56
56
WINDOW *edit;
57
 
        /* The middle portion of the window, i.e, the edit window, where
 
57
        /* The middle portion of the window, i.e. the edit window, where
58
58
         * we display the current file we're editing. */
59
59
WINDOW *bottomwin;
60
60
        /* The bottom portion of the window, where we display statusbar
223
223
}
224
224
 
225
225
/* Add a new shortcut to the end of the shortcut list. */
226
 
void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc,
 
226
void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc
227
227
#ifndef DISABLE_HELP
228
 
        const char *help,
 
228
        , const char *help, bool blank_after
229
229
#endif
230
 
        bool blank_after, int metaval, int funcval, int miscval, bool
231
 
        view, void (*func)(void))
 
230
        , int metaval, int funcval, int miscval, bool view,
 
231
        void (*func)(void))
232
232
{
233
233
    shortcut *s;
234
234
 
246
246
    s->desc = (desc == NULL) ? "" : _(desc);
247
247
#ifndef DISABLE_HELP
248
248
    s->help = (help == NULL) ? "" : _(help);
249
 
#endif
250
249
    s->blank_after = blank_after;
 
250
#endif
251
251
    s->metaval = metaval;
252
252
    s->funcval = funcval;
253
253
    s->miscval = miscval;
260
260
 * Uncut shortcut in the main shortcut list with UnJustify. */
261
261
void shortcut_init(bool unjustify)
262
262
{
263
 
    /* TRANSLATORS: Try to keep this and following strings at most 10 characters. */
 
263
    /* TRANSLATORS: Try to keep this and following strings at most 10
 
264
     * characters. */
264
265
    const char *cancel_msg = N_("Cancel");
265
266
    const char *get_help_msg = N_("Get Help");
266
267
    const char *exit_msg = N_("Exit");
268
269
    const char *prev_page_msg = N_("Prev Page");
269
270
    const char *next_page_msg = N_("Next Page");
270
271
    const char *go_to_line_msg = N_("Go To Line");
271
 
    /* TRANSLATORS: Try to keep this and previous strings at most 10 characters. */
 
272
    /* TRANSLATORS: Try to keep this and previous strings at most 10
 
273
     * characters. */
272
274
    const char *replace_msg = N_("Replace");
273
275
#ifndef NANO_TINY
274
276
    /* TRANSLATORS: Try to keep this at most 12 characters. */
275
277
    const char *whereis_next_msg = N_("WhereIs Next");
276
278
#endif
277
 
    /* TRANSLATORS: Try to keep this and following strings at most 10 characters. */
 
279
    /* TRANSLATORS: Try to keep this and following strings at most 10
 
280
     * characters. */
278
281
    const char *first_line_msg = N_("First Line");
279
282
    const char *last_line_msg = N_("Last Line");
280
 
#ifndef NANO_TINY
281
 
    const char *cut_till_end_msg = N_("CutTillEnd");
282
 
#endif
283
283
#ifndef DISABLE_JUSTIFY
284
284
    const char *beg_of_par_msg = N_("Beg of Par");
285
285
    const char *end_of_par_msg = N_("End of Par");
295
295
#endif
296
296
#ifndef NANO_TINY
297
297
    const char *prev_history_msg = N_("PrevHstory");
298
 
    /* TRANSLATORS: Try to keep this and previous strings at most 10 characters. */
 
298
    /* TRANSLATORS: Try to keep this and previous strings at most 10
 
299
     * characters. */
299
300
    const char *next_history_msg = N_("NextHstory");
300
301
#ifdef ENABLE_MULTIBUFFER
301
302
    /* TRANSLATORS: Try to keep this at most 16 characters. */
345
346
    const char *nano_whereis_next_msg = N_("Repeat last search");
346
347
    const char *nano_copy_msg =
347
348
        N_("Copy the current line and store it in the cutbuffer");
348
 
    const char *nano_indentmarked_msg = N_("Indent marked text");
349
 
    const char *nano_unindentmarked_msg = N_("Unindent marked text");
 
349
    const char *nano_indent_msg = N_("Indent the current line");
 
350
    const char *nano_unindent_msg = N_("Unindent the current line");
350
351
#endif
351
352
    const char *nano_forward_msg = N_("Move forward one character");
352
353
    const char *nano_back_msg = N_("Move back one character");
418
419
#endif
419
420
#ifndef NANO_TINY
420
421
    const char *nano_prev_history_msg =
421
 
        N_("Edit the previous search/replace string");
 
422
        N_("Recall the previous search/replace string");
422
423
    const char *nano_next_history_msg =
423
 
        N_("Edit the next search/replace string");
 
424
        N_("Recall the next search/replace string");
424
425
#endif
425
426
#ifndef DISABLE_BROWSER
426
427
    const char *nano_tofiles_msg = N_("Go to file browser");
452
453
 
453
454
/* The following macro is to be used in calling sc_init_one().  The
454
455
 * point is that sc_init_one() takes 10 arguments, unless DISABLE_HELP
455
 
 * is defined, when the 4th one should not be there. */
 
456
 * is defined, when the 4th and 5th ones should not be there. */
456
457
#ifndef DISABLE_HELP
457
 
#define IFHELP(help, nextvar) help, nextvar
 
458
#define IFSCHELP(help, blank, nextvar) help, blank, nextvar
458
459
#else
459
 
#define IFHELP(help, nextvar) nextvar
 
460
#define IFSCHELP(help, blank, nextvar) nextvar
460
461
#endif
461
462
 
462
463
    free_shortcutage(&main_list);
463
464
 
464
465
    sc_init_one(&main_list, NANO_HELP_KEY, get_help_msg,
465
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
466
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
466
467
        NANO_NO_KEY, VIEW,
467
468
#ifndef DISABLE_HELP
468
469
        do_help_void
476
477
        /* TRANSLATORS: Try to keep this at most 10 characters. */
477
478
        openfile != NULL && openfile != openfile->next ? N_("Close") :
478
479
#endif
479
 
        exit_msg, IFHELP(nano_exit_msg, FALSE), NANO_NO_KEY,
 
480
        exit_msg, IFSCHELP(nano_exit_msg, FALSE, NANO_NO_KEY),
480
481
        NANO_EXIT_FKEY, NANO_NO_KEY, VIEW, do_exit);
481
482
 
482
483
    /* TRANSLATORS: Try to keep this at most 10 characters. */
483
484
    sc_init_one(&main_list, NANO_WRITEOUT_KEY, N_("WriteOut"),
484
 
        IFHELP(nano_writeout_msg, FALSE), NANO_NO_KEY,
 
485
        IFSCHELP(nano_writeout_msg, FALSE, NANO_NO_KEY),
485
486
        NANO_WRITEOUT_FKEY, NANO_NO_KEY, NOVIEW, do_writeout_void);
486
487
 
487
488
    /* TRANSLATORS: Try to keep this at most 10 characters. */
488
489
    sc_init_one(&main_list, NANO_JUSTIFY_KEY, N_("Justify"),
489
 
        IFHELP(nano_justify_msg, TRUE), NANO_NO_KEY, NANO_JUSTIFY_FKEY,
490
 
        NANO_NO_KEY, NOVIEW,
 
490
        IFSCHELP(nano_justify_msg, TRUE, NANO_NO_KEY),
 
491
        NANO_JUSTIFY_FKEY, NANO_NO_KEY, NOVIEW,
491
492
#ifndef DISABLE_JUSTIFY
492
493
        do_justify_void
493
494
#else
500
501
     * restricted mode, inserting files is disabled, since it allows
501
502
     * reading from or writing to files not specified on the command
502
503
     * line. */
503
 
 
504
504
    /* TRANSLATORS: Try to keep this at most 10 characters. */
505
505
    sc_init_one(&main_list, NANO_INSERTFILE_KEY, N_("Read File"),
506
 
        IFHELP(nano_insert_msg, FALSE), NANO_NO_KEY,
 
506
        IFSCHELP(nano_insert_msg, FALSE, NANO_NO_KEY),
507
507
        NANO_INSERTFILE_FKEY, NANO_NO_KEY,
508
508
#ifdef ENABLE_MULTIBUFFER
509
509
        VIEW
513
513
        , !ISSET(RESTRICTED) ? do_insertfile_void : nano_disabled_msg);
514
514
 
515
515
    sc_init_one(&main_list, NANO_WHEREIS_KEY, whereis_msg,
516
 
        IFHELP(nano_whereis_msg, FALSE), NANO_NO_KEY, NANO_WHEREIS_FKEY,
517
 
        NANO_NO_KEY, VIEW, do_search);
 
516
        IFSCHELP(nano_whereis_msg, FALSE, NANO_NO_KEY),
 
517
        NANO_WHEREIS_FKEY, NANO_NO_KEY, VIEW, do_search);
518
518
 
519
519
    sc_init_one(&main_list, NANO_PREVPAGE_KEY, prev_page_msg,
520
 
        IFHELP(nano_prevpage_msg, FALSE), NANO_NO_KEY,
 
520
        IFSCHELP(nano_prevpage_msg, FALSE, NANO_NO_KEY),
521
521
        NANO_PREVPAGE_FKEY, NANO_NO_KEY, VIEW, do_page_up);
522
522
 
523
523
    sc_init_one(&main_list, NANO_NEXTPAGE_KEY, next_page_msg,
524
 
        IFHELP(nano_nextpage_msg, TRUE), NANO_NO_KEY,
 
524
        IFSCHELP(nano_nextpage_msg, TRUE, NANO_NO_KEY),
525
525
        NANO_NEXTPAGE_FKEY, NANO_NO_KEY, VIEW, do_page_down);
526
526
 
527
527
    /* TRANSLATORS: Try to keep this at most 10 characters. */
528
528
    sc_init_one(&main_list, NANO_CUT_KEY, N_("Cut Text"),
529
 
        IFHELP(nano_cut_msg, FALSE), NANO_NO_KEY, NANO_CUT_FKEY,
 
529
        IFSCHELP(nano_cut_msg, FALSE, NANO_NO_KEY), NANO_CUT_FKEY,
530
530
        NANO_NO_KEY, NOVIEW, do_cut_text_void);
531
531
 
532
532
    if (unjustify)
533
 
    /* TRANSLATORS: Try to keep this at most 10 characters. */
 
533
        /* TRANSLATORS: Try to keep this at most 10 characters. */
534
534
        sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, N_("UnJustify"),
535
 
                IFHELP(NULL, FALSE), NANO_NO_KEY, NANO_UNJUSTIFY_FKEY,
 
535
                IFSCHELP(NULL, FALSE, NANO_NO_KEY), NANO_UNJUSTIFY_FKEY,
536
536
                NANO_NO_KEY, NOVIEW, NULL);
537
537
    else
538
 
    /* TRANSLATORS: Try to keep this at most 10 characters. */
 
538
        /* TRANSLATORS: Try to keep this at most 10 characters. */
539
539
        sc_init_one(&main_list, NANO_UNCUT_KEY, N_("UnCut Text"),
540
 
                IFHELP(nano_uncut_msg, FALSE), NANO_NO_KEY,
 
540
                IFSCHELP(nano_uncut_msg, FALSE, NANO_NO_KEY),
541
541
                NANO_UNCUT_FKEY, NANO_NO_KEY, NOVIEW, do_uncut_text);
542
542
 
543
543
    /* TRANSLATORS: Try to keep this at most 10 characters. */
544
544
    sc_init_one(&main_list, NANO_CURSORPOS_KEY, N_("Cur Pos"),
545
 
        IFHELP(nano_cursorpos_msg, FALSE), NANO_NO_KEY,
 
545
        IFSCHELP(nano_cursorpos_msg, FALSE, NANO_NO_KEY),
546
546
        NANO_CURSORPOS_FKEY, NANO_NO_KEY, VIEW, do_cursorpos_void);
547
547
 
548
548
    /* If we're using restricted mode, spell checking is disabled
550
550
     * on the command line. */
551
551
    /* TRANSLATORS: Try to keep this at most 10 characters. */
552
552
    sc_init_one(&main_list, NANO_SPELL_KEY, N_("To Spell"),
553
 
        IFHELP(nano_spell_msg, TRUE), NANO_NO_KEY, NANO_SPELL_FKEY,
 
553
        IFSCHELP(nano_spell_msg, TRUE, NANO_NO_KEY), NANO_SPELL_FKEY,
554
554
        NANO_NO_KEY, NOVIEW,
555
555
#ifndef DISABLE_SPELLER
556
556
        !ISSET(RESTRICTED) ? do_spell :
558
558
        nano_disabled_msg);
559
559
 
560
560
    sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
561
 
        IFHELP(nano_gotoline_msg, FALSE), NANO_GOTOLINE_ALTKEY,
 
561
        IFSCHELP(nano_gotoline_msg, FALSE, NANO_GOTOLINE_ALTKEY),
562
562
        NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW,
563
563
        do_gotolinecolumn_void);
564
564
 
565
565
    sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg
566
566
#ifndef NANO_TINY
567
 
        , IFHELP(nano_replace_msg, FALSE)
 
567
        , IFSCHELP(nano_replace_msg, FALSE, NANO_ALT_REPLACE_KEY)
568
568
#else
569
 
        , IFHELP(nano_replace_msg, TRUE)
 
569
        , IFSCHELP(nano_replace_msg, TRUE, NANO_ALT_REPLACE_KEY)
570
570
#endif
571
 
        , NANO_ALT_REPLACE_KEY, NANO_REPLACE_FKEY, NANO_NO_KEY, NOVIEW,
572
 
        do_replace);
 
571
        , NANO_REPLACE_FKEY, NANO_NO_KEY, NOVIEW, do_replace);
573
572
 
574
573
#ifndef NANO_TINY
575
574
    sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"),
576
 
        IFHELP(nano_mark_msg, FALSE), NANO_MARK_ALTKEY, NANO_MARK_FKEY,
577
 
        NANO_NO_KEY, VIEW, do_mark);
 
575
        IFSCHELP(nano_mark_msg, FALSE, NANO_MARK_ALTKEY),
 
576
        NANO_MARK_FKEY, NANO_NO_KEY, VIEW, do_mark);
578
577
 
579
578
    sc_init_one(&main_list, NANO_NO_KEY, whereis_next_msg,
580
 
        IFHELP(nano_whereis_next_msg, TRUE), NANO_WHEREIS_NEXT_KEY,
 
579
        IFSCHELP(nano_whereis_next_msg, TRUE, NANO_WHEREIS_NEXT_KEY),
581
580
        NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research);
582
581
 
583
582
    sc_init_one(&main_list, NANO_NO_KEY, N_("Copy Text"),
584
 
        IFHELP(nano_copy_msg, FALSE), NANO_COPY_KEY, NANO_NO_KEY,
 
583
        IFSCHELP(nano_copy_msg, FALSE, NANO_COPY_KEY), NANO_NO_KEY,
585
584
        NANO_COPY_ALTKEY, NOVIEW, do_copy_text);
586
585
 
587
586
    sc_init_one(&main_list, NANO_NO_KEY, N_("Indent Text"),
588
 
        IFHELP(nano_indentmarked_msg, FALSE), NANO_INDENTMARKED_KEY,
589
 
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_indent_marked_void);
 
587
        IFSCHELP(nano_indent_msg, FALSE, NANO_INDENT_KEY), NANO_NO_KEY,
 
588
        NANO_NO_KEY, NOVIEW, do_indent_void);
590
589
 
591
590
    sc_init_one(&main_list, NANO_NO_KEY, N_("Unindent Text"),
592
 
        IFHELP(nano_unindentmarked_msg, TRUE), NANO_UNINDENTMARKED_KEY,
593
 
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_unindent_marked_void);
 
591
        IFSCHELP(nano_unindent_msg, TRUE, NANO_UNINDENT_KEY),
 
592
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_unindent);
594
593
#endif
595
594
 
596
595
    sc_init_one(&main_list, NANO_FORWARD_KEY, N_("Forward"),
597
 
        IFHELP(nano_forward_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
596
        IFSCHELP(nano_forward_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
598
597
        NANO_NO_KEY, VIEW, do_right);
599
598
 
600
599
    sc_init_one(&main_list, NANO_BACK_KEY, N_("Back"),
601
 
        IFHELP(nano_back_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
600
        IFSCHELP(nano_back_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
602
601
        NANO_NO_KEY, VIEW, do_left);
603
602
 
604
603
#ifndef NANO_TINY
605
604
    sc_init_one(&main_list, NANO_NEXTWORD_KEY, N_("Next Word"),
606
 
        IFHELP(nano_nextword_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
605
        IFSCHELP(nano_nextword_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
607
606
        NANO_NO_KEY, VIEW, do_next_word_void);
608
607
 
609
608
    sc_init_one(&main_list, NANO_NO_KEY, N_("Prev Word"),
610
 
        IFHELP(nano_prevword_msg, FALSE), NANO_PREVWORD_KEY,
 
609
        IFSCHELP(nano_prevword_msg, FALSE, NANO_PREVWORD_KEY),
611
610
        NANO_NO_KEY, NANO_NO_KEY, VIEW, do_prev_word_void);
612
611
#endif
613
612
 
614
613
    sc_init_one(&main_list, NANO_PREVLINE_KEY, N_("Prev Line"),
615
 
        IFHELP(nano_prevline_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
616
 
        NANO_NO_KEY, VIEW, do_up);
 
614
        IFSCHELP(nano_prevline_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
 
615
        NANO_NO_KEY, VIEW, do_up_void);
617
616
 
618
617
    sc_init_one(&main_list, NANO_NEXTLINE_KEY, N_("Next Line"),
619
 
        IFHELP(nano_nextline_msg, TRUE), NANO_NO_KEY, NANO_NO_KEY,
620
 
        NANO_NO_KEY, VIEW, do_down);
 
618
        IFSCHELP(nano_nextline_msg, TRUE, NANO_NO_KEY), NANO_NO_KEY,
 
619
        NANO_NO_KEY, VIEW, do_down_void);
621
620
 
622
621
    sc_init_one(&main_list, NANO_HOME_KEY, N_("Home"),
623
 
        IFHELP(nano_home_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
622
        IFSCHELP(nano_home_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
624
623
        NANO_NO_KEY, VIEW, do_home);
625
624
 
626
625
    sc_init_one(&main_list, NANO_END_KEY, N_("End"),
627
 
        IFHELP(nano_end_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
626
        IFSCHELP(nano_end_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
628
627
        NANO_NO_KEY, VIEW, do_end);
629
628
 
630
629
#ifndef DISABLE_JUSTIFY
631
630
    sc_init_one(&main_list, NANO_NO_KEY, beg_of_par_msg,
632
 
        IFHELP(nano_parabegin_msg, FALSE), NANO_PARABEGIN_ALTKEY,
 
631
        IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_ALTKEY),
633
632
        NANO_NO_KEY, NANO_PARABEGIN_ALTKEY2, VIEW, do_para_begin_void);
634
633
 
635
634
    sc_init_one(&main_list, NANO_NO_KEY, end_of_par_msg,
636
 
        IFHELP(nano_paraend_msg, FALSE), NANO_PARAEND_ALTKEY,
 
635
        IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_ALTKEY),
637
636
        NANO_NO_KEY, NANO_PARAEND_ALTKEY2, VIEW, do_para_end_void);
638
637
#endif
639
638
 
640
639
    sc_init_one(&main_list, NANO_NO_KEY, first_line_msg,
641
 
        IFHELP(nano_firstline_msg, FALSE), NANO_FIRSTLINE_ALTKEY,
 
640
        IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
642
641
        NANO_NO_KEY, NANO_FIRSTLINE_ALTKEY2, VIEW, do_first_line);
643
642
 
644
643
    sc_init_one(&main_list, NANO_NO_KEY, last_line_msg,
645
 
        IFHELP(nano_lastline_msg, TRUE), NANO_LASTLINE_ALTKEY,
 
644
        IFSCHELP(nano_lastline_msg, TRUE, NANO_LASTLINE_ALTKEY),
646
645
        NANO_NO_KEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
647
646
 
648
647
#ifndef NANO_TINY
649
648
    sc_init_one(&main_list, NANO_NO_KEY, N_("Find Other Bracket"),
650
 
        IFHELP(nano_bracket_msg, FALSE), NANO_BRACKET_KEY, NANO_NO_KEY,
651
 
        NANO_NO_KEY, VIEW, do_find_bracket);
 
649
        IFSCHELP(nano_bracket_msg, FALSE, NANO_BRACKET_KEY),
 
650
        NANO_NO_KEY, NANO_NO_KEY, VIEW, do_find_bracket);
652
651
 
653
652
    sc_init_one(&main_list, NANO_NO_KEY, N_("Scroll Up"),
654
 
        IFHELP(nano_scrollup_msg, FALSE), NANO_SCROLLUP_KEY,
 
653
        IFSCHELP(nano_scrollup_msg, FALSE, NANO_SCROLLUP_KEY),
655
654
        NANO_NO_KEY, NANO_SCROLLUP_ALTKEY, VIEW, do_scroll_up);
656
655
 
657
656
    sc_init_one(&main_list, NANO_NO_KEY, N_("Scroll Down"),
658
 
        IFHELP(nano_scrolldown_msg, TRUE), NANO_SCROLLDOWN_KEY,
 
657
        IFSCHELP(nano_scrolldown_msg, TRUE, NANO_SCROLLDOWN_KEY),
659
658
        NANO_NO_KEY, NANO_SCROLLDOWN_ALTKEY, VIEW, do_scroll_down);
660
659
#endif
661
660
 
662
661
#ifdef ENABLE_MULTIBUFFER
663
662
    sc_init_one(&main_list, NANO_NO_KEY, N_("Previous File"),
664
 
        IFHELP(nano_prevfile_msg, FALSE), NANO_PREVFILE_KEY,
 
663
        IFSCHELP(nano_prevfile_msg, FALSE, NANO_PREVFILE_KEY),
665
664
        NANO_NO_KEY, NANO_PREVFILE_ALTKEY, VIEW,
666
665
        switch_to_prev_buffer_void);
667
666
 
668
667
    sc_init_one(&main_list, NANO_NO_KEY, N_("Next File"),
669
 
        IFHELP(nano_nextfile_msg, TRUE), NANO_NEXTFILE_KEY, NANO_NO_KEY,
670
 
        NANO_NEXTFILE_ALTKEY, VIEW, switch_to_next_buffer_void);
 
668
        IFSCHELP(nano_nextfile_msg, TRUE, NANO_NEXTFILE_KEY),
 
669
        NANO_NO_KEY, NANO_NEXTFILE_ALTKEY, VIEW,
 
670
        switch_to_next_buffer_void);
671
671
#endif
672
672
 
673
673
    sc_init_one(&main_list, NANO_NO_KEY, N_("Verbatim Input"),
674
 
        IFHELP(nano_verbatim_msg, FALSE), NANO_VERBATIM_KEY,
 
674
        IFSCHELP(nano_verbatim_msg, FALSE, NANO_VERBATIM_KEY),
675
675
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_verbatim_input);
676
676
 
677
677
    sc_init_one(&main_list, NANO_TAB_KEY, N_("Tab"),
678
 
        IFHELP(nano_tab_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
678
        IFSCHELP(nano_tab_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
679
679
        NANO_NO_KEY, NOVIEW, do_tab);
680
680
 
681
681
    sc_init_one(&main_list, NANO_ENTER_KEY, N_("Enter"),
682
 
        IFHELP(nano_enter_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
682
        IFSCHELP(nano_enter_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
683
683
        NANO_NO_KEY, NOVIEW, do_enter);
684
684
 
685
685
    sc_init_one(&main_list, NANO_DELETE_KEY, N_("Delete"),
686
 
        IFHELP(nano_delete_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
686
        IFSCHELP(nano_delete_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
687
687
        NANO_NO_KEY, NOVIEW, do_delete);
688
688
 
689
689
    sc_init_one(&main_list, NANO_BACKSPACE_KEY, N_("Backspace")
690
690
#ifndef NANO_TINY
691
 
        , IFHELP(nano_backspace_msg, FALSE)
 
691
        , IFSCHELP(nano_backspace_msg, FALSE, NANO_NO_KEY)
692
692
#else
693
 
        , IFHELP(nano_backspace_msg, TRUE)
 
693
        , IFSCHELP(nano_backspace_msg, TRUE, NANO_NO_KEY)
694
694
#endif
695
 
        , NANO_NO_KEY, NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_backspace);
 
695
        , NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_backspace);
696
696
 
697
697
#ifndef NANO_TINY
698
 
    sc_init_one(&main_list, NANO_NO_KEY, cut_till_end_msg,
699
 
        IFHELP(nano_cut_till_end_msg, TRUE), NANO_CUTTILLEND_ALTKEY,
 
698
    sc_init_one(&main_list, NANO_NO_KEY, N_("CutTillEnd"),
 
699
        IFSCHELP(nano_cut_till_end_msg, TRUE, NANO_CUTTILLEND_ALTKEY),
700
700
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
701
701
#endif
702
702
 
703
703
#ifndef DISABLE_JUSTIFY
704
704
    sc_init_one(&main_list, NANO_NO_KEY, fulljstify_msg,
705
 
        IFHELP(nano_fulljustify_msg, FALSE), NANO_FULLJUSTIFY_ALTKEY,
 
705
        IFSCHELP(nano_fulljustify_msg, FALSE, NANO_FULLJUSTIFY_ALTKEY),
706
706
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify);
707
707
#endif
708
708
 
709
709
#ifndef NANO_TINY
710
710
    sc_init_one(&main_list, NANO_NO_KEY, N_("Word Count"),
711
 
        IFHELP(nano_wordcount_msg, FALSE), NANO_WORDCOUNT_KEY,
 
711
        IFSCHELP(nano_wordcount_msg, FALSE, NANO_WORDCOUNT_KEY),
712
712
        NANO_NO_KEY, NANO_NO_KEY, VIEW, do_wordlinechar_count);
713
713
#endif
714
714
 
715
715
    sc_init_one(&main_list, NANO_REFRESH_KEY, refresh_msg
716
716
#ifndef NANO_TINY
717
 
        , IFHELP(nano_refresh_msg, TRUE)
 
717
        , IFSCHELP(nano_refresh_msg, TRUE, NANO_NO_KEY)
718
718
#else
719
 
        , IFHELP(nano_refresh_msg, FALSE)
 
719
        , IFSCHELP(nano_refresh_msg, FALSE, NANO_NO_KEY)
720
720
#endif
721
 
        , NANO_NO_KEY, NANO_NO_KEY, NANO_NO_KEY, VIEW, total_refresh);
 
721
        , NANO_NO_KEY, NANO_NO_KEY, VIEW, total_refresh);
722
722
 
723
723
    free_shortcutage(&whereis_list);
724
724
 
725
725
    sc_init_one(&whereis_list, NANO_HELP_KEY, get_help_msg,
726
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
726
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
727
727
        NANO_NO_KEY, VIEW,
728
728
#ifndef DISABLE_HELP
729
729
        do_help_void
733
733
        );
734
734
 
735
735
    sc_init_one(&whereis_list, NANO_CANCEL_KEY, cancel_msg,
736
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
736
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
737
737
        NANO_NO_KEY, VIEW, NULL);
738
738
 
739
739
    sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, first_line_msg,
740
 
        IFHELP(nano_firstline_msg, FALSE), NANO_FIRSTLINE_ALTKEY,
 
740
        IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
741
741
        NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
742
742
        do_first_line);
743
743
 
744
744
    sc_init_one(&whereis_list, NANO_LASTLINE_KEY, last_line_msg,
745
 
        IFHELP(nano_lastline_msg, FALSE), NANO_LASTLINE_ALTKEY,
 
745
        IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
746
746
        NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
747
747
 
748
748
    sc_init_one(&whereis_list, NANO_TOOTHERSEARCH_KEY, replace_msg,
749
 
        IFHELP(nano_replace_msg, FALSE), NANO_NO_KEY, NANO_REPLACE_FKEY,
750
 
        NANO_NO_KEY, VIEW, NULL);
 
749
        IFSCHELP(nano_replace_msg, FALSE, NANO_NO_KEY),
 
750
        NANO_REPLACE_FKEY, NANO_NO_KEY, VIEW, NULL);
751
751
 
752
752
    sc_init_one(&whereis_list, NANO_TOGOTOLINE_KEY, go_to_line_msg,
753
 
        IFHELP(nano_gotoline_msg, FALSE), NANO_NO_KEY,
 
753
        IFSCHELP(nano_gotoline_msg, FALSE, NANO_NO_KEY),
754
754
        NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW, NULL);
755
755
 
756
756
#ifndef DISABLE_JUSTIFY
757
757
    sc_init_one(&whereis_list, NANO_PARABEGIN_KEY, beg_of_par_msg,
758
 
        IFHELP(nano_parabegin_msg, FALSE), NANO_PARABEGIN_ALTKEY,
 
758
        IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_ALTKEY),
759
759
        NANO_NO_KEY, NANO_PARABEGIN_ALTKEY2, VIEW, do_para_begin_void);
760
760
 
761
761
    sc_init_one(&whereis_list, NANO_PARAEND_KEY, end_of_par_msg,
762
 
        IFHELP(nano_paraend_msg, FALSE), NANO_PARAEND_ALTKEY,
 
762
        IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_ALTKEY),
763
763
        NANO_NO_KEY, NANO_PARAEND_ALTKEY2, VIEW, do_para_end_void);
764
764
#endif
765
765
 
766
766
#ifndef NANO_TINY
767
767
    sc_init_one(&whereis_list, NANO_NO_KEY, case_sens_msg,
768
 
        IFHELP(nano_case_msg, FALSE), TOGGLE_CASE_KEY, NANO_NO_KEY,
 
768
        IFSCHELP(nano_case_msg, FALSE, TOGGLE_CASE_KEY), NANO_NO_KEY,
769
769
        NANO_NO_KEY, VIEW, NULL);
770
770
 
771
771
    sc_init_one(&whereis_list, NANO_NO_KEY, backwards_msg,
772
 
        IFHELP(nano_reverse_msg, FALSE), TOGGLE_BACKWARDS_KEY,
 
772
        IFSCHELP(nano_reverse_msg, FALSE, TOGGLE_BACKWARDS_KEY),
773
773
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
774
774
#endif
775
775
 
776
776
#ifdef HAVE_REGEX_H
777
777
    sc_init_one(&whereis_list, NANO_NO_KEY, regexp_msg,
778
 
        IFHELP(nano_regexp_msg, FALSE), NANO_REGEXP_KEY, NANO_NO_KEY,
 
778
        IFSCHELP(nano_regexp_msg, FALSE, NANO_REGEXP_KEY), NANO_NO_KEY,
779
779
        NANO_NO_KEY, VIEW, NULL);
780
780
#endif
781
781
 
782
782
#ifndef NANO_TINY
783
783
    sc_init_one(&whereis_list, NANO_PREVLINE_KEY, prev_history_msg,
784
 
        IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
785
 
        NANO_NO_KEY, VIEW, NULL);
 
784
        IFSCHELP(nano_prev_history_msg, FALSE, NANO_NO_KEY),
 
785
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
786
786
 
787
787
    sc_init_one(&whereis_list, NANO_NEXTLINE_KEY, next_history_msg,
788
 
        IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
789
 
        NANO_NO_KEY, VIEW, NULL);
790
 
 
791
 
    sc_init_one(&whereis_list, NANO_CUTTILLEND_KEY, cut_till_end_msg,
792
 
        IFHELP(nano_cut_till_end_msg, FALSE), NANO_CUTTILLEND_ALTKEY,
793
 
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
 
788
        IFSCHELP(nano_next_history_msg, FALSE, NANO_NO_KEY),
 
789
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
794
790
#endif
795
791
 
796
792
#ifndef DISABLE_JUSTIFY
797
793
    sc_init_one(&whereis_list, NANO_FULLJUSTIFY_KEY, fulljstify_msg,
798
 
        IFHELP(nano_fulljustify_msg, FALSE), NANO_FULLJUSTIFY_ALTKEY,
 
794
        IFSCHELP(nano_fulljustify_msg, FALSE, NANO_FULLJUSTIFY_ALTKEY),
799
795
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify);
800
796
#endif
801
797
 
802
798
    free_shortcutage(&replace_list);
803
799
 
804
800
    sc_init_one(&replace_list, NANO_HELP_KEY, get_help_msg,
805
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
801
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
806
802
        NANO_NO_KEY, VIEW,
807
803
#ifndef DISABLE_HELP
808
804
        do_help_void
812
808
        );
813
809
 
814
810
    sc_init_one(&replace_list, NANO_CANCEL_KEY, cancel_msg,
815
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
811
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
816
812
        NANO_NO_KEY, VIEW, NULL);
817
813
 
818
814
    sc_init_one(&replace_list, NANO_FIRSTLINE_KEY, first_line_msg,
819
 
        IFHELP(nano_firstline_msg, FALSE), NANO_FIRSTLINE_ALTKEY,
 
815
        IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
820
816
        NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
821
817
        do_first_line);
822
818
 
823
819
    sc_init_one(&replace_list, NANO_LASTLINE_KEY, last_line_msg,
824
 
        IFHELP(nano_lastline_msg, FALSE), NANO_LASTLINE_ALTKEY,
 
820
        IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
825
821
        NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
826
822
 
827
823
    /* TRANSLATORS: Try to keep this at most 12 characters. */
828
824
    sc_init_one(&replace_list, NANO_TOOTHERSEARCH_KEY, N_("No Replace"),
829
 
        IFHELP(nano_whereis_msg, FALSE), NANO_NO_KEY, NANO_REPLACE_FKEY,
830
 
        NANO_NO_KEY, VIEW, NULL);
 
825
        IFSCHELP(nano_whereis_msg, FALSE, NANO_NO_KEY),
 
826
        NANO_REPLACE_FKEY, NANO_NO_KEY, VIEW, NULL);
831
827
 
832
828
#ifndef NANO_TINY
833
829
    sc_init_one(&replace_list, NANO_NO_KEY, case_sens_msg,
834
 
        IFHELP(nano_case_msg, FALSE), TOGGLE_CASE_KEY, NANO_NO_KEY,
 
830
        IFSCHELP(nano_case_msg, FALSE, TOGGLE_CASE_KEY), NANO_NO_KEY,
835
831
        NANO_NO_KEY, VIEW, NULL);
836
832
 
837
833
    sc_init_one(&replace_list, NANO_NO_KEY, backwards_msg,
838
 
        IFHELP(nano_reverse_msg, FALSE), TOGGLE_BACKWARDS_KEY,
 
834
        IFSCHELP(nano_reverse_msg, FALSE, TOGGLE_BACKWARDS_KEY),
839
835
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
840
836
#endif
841
837
 
842
838
#ifdef HAVE_REGEX_H
843
839
    sc_init_one(&replace_list, NANO_NO_KEY, regexp_msg,
844
 
        IFHELP(nano_regexp_msg, FALSE), NANO_REGEXP_KEY, NANO_NO_KEY,
 
840
        IFSCHELP(nano_regexp_msg, FALSE, NANO_REGEXP_KEY), NANO_NO_KEY,
845
841
        NANO_NO_KEY, VIEW, NULL);
846
842
#endif
847
843
 
848
844
#ifndef NANO_TINY
849
845
    sc_init_one(&replace_list, NANO_PREVLINE_KEY, prev_history_msg,
850
 
        IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
851
 
        NANO_NO_KEY, VIEW, NULL);
 
846
        IFSCHELP(nano_prev_history_msg, FALSE, NANO_NO_KEY),
 
847
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
852
848
 
853
849
    sc_init_one(&replace_list, NANO_NEXTLINE_KEY, next_history_msg,
854
 
        IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
855
 
        NANO_NO_KEY, VIEW, NULL);
 
850
        IFSCHELP(nano_next_history_msg, FALSE, NANO_NO_KEY),
 
851
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
856
852
#endif
857
853
 
858
854
    free_shortcutage(&replace_list_2);
859
855
 
860
856
    sc_init_one(&replace_list_2, NANO_HELP_KEY, get_help_msg,
861
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
857
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
862
858
        NANO_NO_KEY, VIEW,
863
859
#ifndef DISABLE_HELP
864
860
        do_help_void
868
864
        );
869
865
 
870
866
    sc_init_one(&replace_list_2, NANO_CANCEL_KEY, cancel_msg,
871
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
867
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
872
868
        NANO_NO_KEY, VIEW, NULL);
873
869
 
874
870
    sc_init_one(&replace_list_2, NANO_FIRSTLINE_KEY, first_line_msg,
875
 
        IFHELP(nano_firstline_msg, FALSE), NANO_FIRSTLINE_ALTKEY,
 
871
        IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
876
872
        NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
877
873
        do_first_line);
878
874
 
879
875
    sc_init_one(&replace_list_2, NANO_LASTLINE_KEY, last_line_msg,
880
 
        IFHELP(nano_lastline_msg, FALSE), NANO_LASTLINE_ALTKEY,
 
876
        IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
881
877
        NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
882
878
 
883
879
#ifndef NANO_TINY
884
880
    sc_init_one(&replace_list_2, NANO_PREVLINE_KEY, prev_history_msg,
885
 
        IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
886
 
        NANO_NO_KEY, VIEW, NULL);
 
881
        IFSCHELP(nano_prev_history_msg, FALSE, NANO_NO_KEY),
 
882
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
887
883
 
888
884
    sc_init_one(&replace_list_2, NANO_NEXTLINE_KEY, next_history_msg,
889
 
        IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
890
 
        NANO_NO_KEY, VIEW, NULL);
 
885
        IFSCHELP(nano_next_history_msg, FALSE, NANO_NO_KEY),
 
886
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
891
887
#endif
892
888
 
893
889
    free_shortcutage(&gotoline_list);
894
890
 
895
891
    sc_init_one(&gotoline_list, NANO_HELP_KEY, get_help_msg,
896
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
892
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
897
893
        NANO_NO_KEY, VIEW,
898
894
#ifndef DISABLE_HELP
899
895
        do_help_void
903
899
        );
904
900
 
905
901
    sc_init_one(&gotoline_list, NANO_CANCEL_KEY, cancel_msg,
906
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
902
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
907
903
        NANO_NO_KEY, VIEW, NULL);
908
904
 
909
905
    sc_init_one(&gotoline_list, NANO_FIRSTLINE_KEY, first_line_msg,
910
 
        IFHELP(nano_firstline_msg, FALSE), NANO_FIRSTLINE_ALTKEY,
 
906
        IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
911
907
        NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
912
908
        do_first_line);
913
909
 
914
910
    sc_init_one(&gotoline_list, NANO_LASTLINE_KEY, last_line_msg,
915
 
        IFHELP(nano_lastline_msg, FALSE), NANO_LASTLINE_ALTKEY,
 
911
        IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
916
912
        NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
917
913
 
918
914
    sc_init_one(&gotoline_list, NANO_TOOTHERWHEREIS_KEY,
919
 
        N_("Go To Text"), IFHELP(nano_whereis_msg, FALSE), NANO_NO_KEY,
920
 
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
 
915
        N_("Go To Text"), IFSCHELP(nano_whereis_msg, FALSE,
 
916
        NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
921
917
 
922
918
    free_shortcutage(&writefile_list);
923
919
 
924
920
    sc_init_one(&writefile_list, NANO_HELP_KEY, get_help_msg,
925
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
921
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
926
922
        NANO_NO_KEY, VIEW,
927
923
#ifndef DISABLE_HELP
928
924
        do_help_void
932
928
        );
933
929
 
934
930
    sc_init_one(&writefile_list, NANO_CANCEL_KEY, cancel_msg,
935
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
931
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
936
932
        NANO_NO_KEY, VIEW, NULL);
937
933
 
938
934
#ifndef DISABLE_BROWSER
939
935
    /* If we're using restricted mode, the file browser is disabled.
940
936
     * It's useless since inserting files is disabled. */
941
 
 
942
937
    if (!ISSET(RESTRICTED))
943
938
        sc_init_one(&writefile_list, NANO_TOFILES_KEY, to_files_msg,
944
 
                IFHELP(nano_tofiles_msg, FALSE), NANO_NO_KEY,
 
939
                IFSCHELP(nano_tofiles_msg, FALSE, NANO_NO_KEY),
945
940
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
946
941
#endif
947
942
 
952
947
     * and fourth are disabled because they allow writing to files not
953
948
     * specified on the command line, and the fifth is useless since
954
949
     * backups are disabled. */
955
 
 
956
950
    if (!ISSET(RESTRICTED))
957
951
        /* TRANSLATORS: Try to keep this at most 16 characters. */
958
952
        sc_init_one(&writefile_list, NANO_NO_KEY, N_("DOS Format"),
959
 
                IFHELP(nano_dos_msg, FALSE), TOGGLE_DOS_KEY,
 
953
                IFSCHELP(nano_dos_msg, FALSE, TOGGLE_DOS_KEY),
960
954
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
961
955
 
962
956
    if (!ISSET(RESTRICTED))
963
957
        /* TRANSLATORS: Try to keep this at most 16 characters. */
964
958
        sc_init_one(&writefile_list, NANO_NO_KEY, N_("Mac Format"),
965
 
                IFHELP(nano_mac_msg, FALSE), TOGGLE_MAC_KEY,
 
959
                IFSCHELP(nano_mac_msg, FALSE, TOGGLE_MAC_KEY),
966
960
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
967
961
#endif
968
962
 
969
963
    if (!ISSET(RESTRICTED))
970
964
        /* TRANSLATORS: Try to keep this at most 16 characters. */
971
965
        sc_init_one(&writefile_list, NANO_NO_KEY, N_("Append"),
972
 
                IFHELP(nano_append_msg, FALSE), NANO_APPEND_KEY,
 
966
                IFSCHELP(nano_append_msg, FALSE, NANO_APPEND_KEY),
973
967
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
974
968
 
975
969
    if (!ISSET(RESTRICTED))
976
970
        /* TRANSLATORS: Try to keep this at most 16 characters. */
977
971
        sc_init_one(&writefile_list, NANO_NO_KEY, N_("Prepend"),
978
 
                IFHELP(nano_prepend_msg, FALSE), NANO_PREPEND_KEY,
 
972
                IFSCHELP(nano_prepend_msg, FALSE, NANO_PREPEND_KEY),
979
973
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
980
974
 
981
975
#ifndef NANO_TINY
982
976
    if (!ISSET(RESTRICTED))
983
977
        /* TRANSLATORS: Try to keep this at most 16 characters. */
984
978
        sc_init_one(&writefile_list, NANO_NO_KEY, N_("Backup File"),
985
 
                IFHELP(nano_backup_msg, FALSE), TOGGLE_BACKUP_KEY,
 
979
                IFSCHELP(nano_backup_msg, FALSE, TOGGLE_BACKUP_KEY),
986
980
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
987
981
#endif
988
982
 
989
983
    free_shortcutage(&insertfile_list);
990
984
 
991
985
    sc_init_one(&insertfile_list, NANO_HELP_KEY, get_help_msg,
992
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
986
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
993
987
        NANO_NO_KEY, VIEW,
994
988
#ifndef DISABLE_HELP
995
989
        do_help_void
999
993
        );
1000
994
 
1001
995
    sc_init_one(&insertfile_list, NANO_CANCEL_KEY, cancel_msg,
1002
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
996
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1003
997
        NANO_NO_KEY, VIEW, NULL);
1004
998
 
1005
999
#ifndef DISABLE_BROWSER
1007
1001
     * It's useless since inserting files is disabled. */
1008
1002
    if (!ISSET(RESTRICTED))
1009
1003
        sc_init_one(&insertfile_list, NANO_TOFILES_KEY, to_files_msg,
1010
 
                IFHELP(nano_tofiles_msg, FALSE), NANO_NO_KEY,
 
1004
                IFSCHELP(nano_tofiles_msg, FALSE, NANO_NO_KEY),
1011
1005
                NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
1012
1006
#endif
1013
1007
 
1014
1008
#ifndef NANO_TINY
1015
1009
    /* If we're using restricted mode, command execution is disabled.
1016
1010
     * It's useless since inserting files is disabled. */
1017
 
 
1018
1011
    if (!ISSET(RESTRICTED))
1019
1012
        sc_init_one(&insertfile_list, NANO_TOOTHERINSERT_KEY,
1020
 
                /* TRANSLATORS: Try to keep this at most 22 characters. */
1021
 
                N_("Execute Command"), IFHELP(nano_execute_msg, FALSE),
1022
 
                NANO_NO_KEY, NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
 
1013
                /* TRANSLATORS: Try to keep this at most 22
 
1014
                 * characters. */
 
1015
                N_("Execute Command"), IFSCHELP(nano_execute_msg, FALSE,
 
1016
                NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
1023
1017
 
1024
1018
#ifdef ENABLE_MULTIBUFFER
1025
1019
    /* If we're using restricted mode, the multibuffer toggle is
1026
1020
     * disabled.  It's useless since inserting files is disabled. */
1027
 
 
1028
1021
    if (!ISSET(RESTRICTED))
1029
1022
        sc_init_one(&insertfile_list, NANO_NO_KEY, new_buffer_msg,
1030
 
                IFHELP(nano_multibuffer_msg, FALSE),
1031
 
                TOGGLE_MULTIBUFFER_KEY, NANO_NO_KEY, NANO_NO_KEY,
 
1023
                IFSCHELP(nano_multibuffer_msg, FALSE,
 
1024
                TOGGLE_MULTIBUFFER_KEY), NANO_NO_KEY, NANO_NO_KEY,
1032
1025
                NOVIEW, NULL);
1033
1026
#endif
1034
1027
#endif
1037
1030
    free_shortcutage(&extcmd_list);
1038
1031
 
1039
1032
    sc_init_one(&extcmd_list, NANO_HELP_KEY, get_help_msg,
1040
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
1033
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
1041
1034
        NANO_NO_KEY, VIEW,
1042
1035
#ifndef DISABLE_HELP
1043
1036
        do_help_void
1047
1040
        );
1048
1041
 
1049
1042
    sc_init_one(&extcmd_list, NANO_CANCEL_KEY, cancel_msg,
1050
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1043
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1051
1044
        NANO_NO_KEY, VIEW, NULL);
1052
1045
 
1053
1046
    sc_init_one(&extcmd_list, NANO_TOOTHERINSERT_KEY, N_("Insert File"),
1054
 
        IFHELP(nano_insert_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1047
        IFSCHELP(nano_insert_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1055
1048
        NANO_NO_KEY, VIEW, NULL);
1056
1049
 
1057
1050
#ifdef ENABLE_MULTIBUFFER
1058
1051
    sc_init_one(&extcmd_list, NANO_NO_KEY, new_buffer_msg,
1059
 
        IFHELP(nano_multibuffer_msg, FALSE), TOGGLE_MULTIBUFFER_KEY,
 
1052
        IFSCHELP(nano_multibuffer_msg, FALSE, TOGGLE_MULTIBUFFER_KEY),
1060
1053
        NANO_NO_KEY, NANO_NO_KEY, NOVIEW, NULL);
1061
1054
#endif
1062
1055
#endif
1065
1058
    free_shortcutage(&help_list);
1066
1059
 
1067
1060
    sc_init_one(&help_list, NANO_REFRESH_KEY, refresh_msg,
1068
 
        IFHELP(nano_refresh_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1061
        IFSCHELP(nano_refresh_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1069
1062
        NANO_NO_KEY, VIEW, NULL);
1070
1063
 
1071
1064
    sc_init_one(&help_list, NANO_EXIT_KEY, exit_msg,
1072
 
        IFHELP(nano_exit_msg, FALSE), NANO_NO_KEY, NANO_EXIT_FKEY,
 
1065
        IFSCHELP(nano_exit_msg, FALSE, NANO_NO_KEY), NANO_EXIT_FKEY,
1073
1066
        NANO_NO_KEY, VIEW, NULL);
1074
1067
 
1075
1068
    sc_init_one(&help_list, NANO_PREVPAGE_KEY, prev_page_msg,
1076
 
        IFHELP(nano_prevpage_msg, FALSE), NANO_NO_KEY,
 
1069
        IFSCHELP(nano_prevpage_msg, FALSE, NANO_NO_KEY),
1077
1070
        NANO_PREVPAGE_FKEY, NANO_NO_KEY, VIEW, NULL);
1078
1071
 
1079
1072
    sc_init_one(&help_list, NANO_NEXTPAGE_KEY, next_page_msg,
1080
 
        IFHELP(nano_nextpage_msg, FALSE), NANO_NO_KEY,
 
1073
        IFSCHELP(nano_nextpage_msg, FALSE, NANO_NO_KEY),
1081
1074
        NANO_NEXTPAGE_FKEY, NANO_NO_KEY, VIEW, NULL);
1082
1075
 
1083
1076
    sc_init_one(&help_list, NANO_PREVLINE_KEY, N_("Prev Line"),
1084
 
        IFHELP(nano_prevline_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1077
        IFSCHELP(nano_prevline_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1085
1078
        NANO_NO_KEY, VIEW, NULL);
1086
1079
 
1087
1080
    sc_init_one(&help_list, NANO_NEXTLINE_KEY, N_("Next Line"),
1088
 
        IFHELP(nano_nextline_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1081
        IFSCHELP(nano_nextline_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1089
1082
        NANO_NO_KEY, VIEW, NULL);
1090
1083
 
1091
1084
    sc_init_one(&help_list, NANO_NO_KEY, first_line_msg,
1092
 
        IFHELP(nano_firstline_msg, FALSE), NANO_FIRSTLINE_ALTKEY,
 
1085
        IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
1093
1086
        NANO_NO_KEY, NANO_FIRSTLINE_ALTKEY2, VIEW, NULL);
1094
1087
 
1095
1088
    sc_init_one(&help_list, NANO_NO_KEY, last_line_msg,
1096
 
        IFHELP(nano_lastline_msg, TRUE), NANO_LASTLINE_ALTKEY,
 
1089
        IFSCHELP(nano_lastline_msg, TRUE, NANO_LASTLINE_ALTKEY),
1097
1090
        NANO_NO_KEY, NANO_LASTLINE_ALTKEY2, VIEW, NULL);
1098
1091
#endif
1099
1092
 
1101
1094
    free_shortcutage(&spell_list);
1102
1095
 
1103
1096
    sc_init_one(&spell_list, NANO_HELP_KEY, get_help_msg,
1104
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
1097
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
1105
1098
        NANO_NO_KEY, VIEW,
1106
1099
#ifndef DISABLE_HELP
1107
1100
        do_help_void
1111
1104
        );
1112
1105
 
1113
1106
    sc_init_one(&spell_list, NANO_CANCEL_KEY, cancel_msg,
1114
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1107
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1115
1108
        NANO_NO_KEY, VIEW, NULL);
1116
1109
#endif
1117
1110
 
1119
1112
    free_shortcutage(&browser_list);
1120
1113
 
1121
1114
    sc_init_one(&browser_list, NANO_HELP_KEY, get_help_msg,
1122
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
1115
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
1123
1116
        NANO_NO_KEY, VIEW, NULL);
1124
1117
 
1125
1118
    sc_init_one(&browser_list, NANO_EXIT_KEY, exit_msg,
1126
 
        IFHELP(nano_exitbrowser_msg, FALSE), NANO_NO_KEY,
 
1119
        IFSCHELP(nano_exitbrowser_msg, FALSE, NANO_NO_KEY),
1127
1120
        NANO_EXIT_FKEY, NANO_NO_KEY, VIEW, NULL);
1128
1121
 
1129
1122
    sc_init_one(&browser_list, NANO_WHEREIS_KEY, whereis_msg,
1130
 
        IFHELP(nano_whereis_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1123
        IFSCHELP(nano_whereis_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1131
1124
        NANO_NO_KEY, VIEW, NULL);
1132
1125
 
1133
1126
    sc_init_one(&browser_list, NANO_NO_KEY, whereis_next_msg,
1134
 
        IFHELP(nano_whereis_next_msg, FALSE), NANO_WHEREIS_NEXT_KEY,
 
1127
        IFSCHELP(nano_whereis_next_msg, FALSE, NANO_WHEREIS_NEXT_KEY),
1135
1128
        NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, NULL);
1136
1129
 
1137
1130
    sc_init_one(&browser_list, NANO_PREVPAGE_KEY, prev_page_msg,
1138
 
        IFHELP(nano_prevpage_msg, FALSE), NANO_NO_KEY,
 
1131
        IFSCHELP(nano_prevpage_msg, FALSE, NANO_NO_KEY),
1139
1132
        NANO_PREVPAGE_FKEY, NANO_NO_KEY, VIEW, NULL);
1140
1133
 
1141
1134
    sc_init_one(&browser_list, NANO_NEXTPAGE_KEY, next_page_msg,
1142
 
        IFHELP(nano_nextpage_msg, FALSE), NANO_NO_KEY,
 
1135
        IFSCHELP(nano_nextpage_msg, FALSE, NANO_NO_KEY),
1143
1136
        NANO_NEXTPAGE_FKEY, NANO_NO_KEY, VIEW, NULL);
1144
1137
 
1145
1138
    sc_init_one(&browser_list, NANO_NO_KEY, first_file_msg,
1146
 
        IFHELP(nano_firstfile_msg, FALSE), NANO_FIRSTFILE_ALTKEY,
 
1139
        IFSCHELP(nano_firstfile_msg, FALSE, NANO_FIRSTFILE_ALTKEY),
1147
1140
        NANO_NO_KEY, NANO_FIRSTFILE_ALTKEY2, VIEW, NULL);
1148
1141
 
1149
1142
    sc_init_one(&browser_list, NANO_NO_KEY, last_file_msg,
1150
 
        IFHELP(nano_lastfile_msg, FALSE), NANO_LASTFILE_ALTKEY,
 
1143
        IFSCHELP(nano_lastfile_msg, FALSE, NANO_LASTFILE_ALTKEY),
1151
1144
        NANO_NO_KEY, NANO_LASTFILE_ALTKEY2, VIEW, NULL);
1152
1145
 
1153
1146
    /* TRANSLATORS: Try to keep this at most 12 characters. */
1154
1147
    sc_init_one(&browser_list, NANO_GOTODIR_KEY, N_("Go To Dir"),
1155
 
        IFHELP(nano_gotodir_msg, FALSE), NANO_GOTODIR_ALTKEY,
 
1148
        IFSCHELP(nano_gotodir_msg, FALSE, NANO_GOTODIR_ALTKEY),
1156
1149
        NANO_GOTODIR_FKEY, NANO_NO_KEY, VIEW, NULL);
1157
1150
 
1158
1151
    free_shortcutage(&whereis_file_list);
1159
1152
 
1160
1153
    sc_init_one(&whereis_file_list, NANO_HELP_KEY, get_help_msg,
1161
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
1154
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
1162
1155
        NANO_NO_KEY, VIEW,
1163
1156
#ifndef DISABLE_HELP
1164
1157
        do_browser_help
1168
1161
        );
1169
1162
 
1170
1163
    sc_init_one(&whereis_file_list, NANO_CANCEL_KEY, cancel_msg,
1171
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1164
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1172
1165
        NANO_NO_KEY, VIEW, NULL);
1173
1166
 
1174
1167
    sc_init_one(&whereis_file_list, NANO_FIRSTFILE_KEY, first_file_msg,
1175
 
        IFHELP(nano_firstfile_msg, FALSE), NANO_FIRSTFILE_ALTKEY,
 
1168
        IFSCHELP(nano_firstfile_msg, FALSE, NANO_FIRSTFILE_ALTKEY),
1176
1169
        NANO_FIRSTFILE_FKEY, NANO_FIRSTFILE_ALTKEY2, VIEW,
1177
1170
        do_first_file);
1178
1171
 
1179
1172
    sc_init_one(&whereis_file_list, NANO_LASTFILE_KEY, last_file_msg,
1180
 
        IFHELP(nano_lastfile_msg, FALSE), NANO_LASTFILE_ALTKEY,
 
1173
        IFSCHELP(nano_lastfile_msg, FALSE, NANO_LASTFILE_ALTKEY),
1181
1174
        NANO_LASTFILE_FKEY, NANO_LASTFILE_ALTKEY2, VIEW, do_last_file);
1182
1175
 
1183
1176
#ifndef NANO_SMALL
1184
1177
    sc_init_one(&whereis_file_list, NANO_NO_KEY, case_sens_msg,
1185
 
        IFHELP(nano_case_msg, FALSE), TOGGLE_CASE_KEY, NANO_NO_KEY,
 
1178
        IFSCHELP(nano_case_msg, FALSE, TOGGLE_CASE_KEY), NANO_NO_KEY,
1186
1179
        NANO_NO_KEY, VIEW, NULL);
1187
1180
 
1188
1181
    sc_init_one(&whereis_file_list, NANO_NO_KEY, backwards_msg,
1189
 
        IFHELP(nano_reverse_msg, FALSE), TOGGLE_BACKWARDS_KEY,
 
1182
        IFSCHELP(nano_reverse_msg, FALSE, TOGGLE_BACKWARDS_KEY),
1190
1183
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
1191
1184
#endif
1192
1185
 
1193
1186
#ifdef HAVE_REGEX_H
1194
1187
    sc_init_one(&whereis_file_list, NANO_NO_KEY, regexp_msg,
1195
 
        IFHELP(nano_regexp_msg, FALSE), NANO_REGEXP_KEY, NANO_NO_KEY,
 
1188
        IFSCHELP(nano_regexp_msg, FALSE, NANO_REGEXP_KEY), NANO_NO_KEY,
1196
1189
        NANO_NO_KEY, VIEW, NULL);
1197
1190
#endif
1198
1191
 
1199
1192
#ifndef NANO_SMALL
1200
1193
    sc_init_one(&whereis_file_list, NANO_PREVLINE_KEY, prev_history_msg,
1201
 
        IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
1202
 
        NANO_NO_KEY, VIEW, NULL);
 
1194
        IFSCHELP(nano_prev_history_msg, FALSE, NANO_NO_KEY),
 
1195
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
1203
1196
 
1204
1197
    sc_init_one(&whereis_file_list, NANO_NEXTLINE_KEY, next_history_msg,
1205
 
        IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
1206
 
        NANO_NO_KEY, VIEW, NULL);
 
1198
        IFSCHELP(nano_next_history_msg, FALSE, NANO_NO_KEY),
 
1199
        NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
1207
1200
#endif
1208
1201
 
1209
1202
    free_shortcutage(&gotodir_list);
1210
1203
 
1211
1204
    sc_init_one(&gotodir_list, NANO_HELP_KEY, get_help_msg,
1212
 
        IFHELP(nano_help_msg, FALSE), NANO_NO_KEY, NANO_HELP_FKEY,
 
1205
        IFSCHELP(nano_help_msg, FALSE, NANO_NO_KEY), NANO_HELP_FKEY,
1213
1206
        NANO_NO_KEY, VIEW,
1214
1207
#ifndef DISABLE_HELP
1215
 
        do_help_void
 
1208
        do_browser_help
1216
1209
#else
1217
1210
        nano_disabled_msg
1218
1211
#endif
1219
1212
        );
1220
1213
 
1221
1214
    sc_init_one(&gotodir_list, NANO_CANCEL_KEY, cancel_msg,
1222
 
        IFHELP(nano_cancel_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
 
1215
        IFSCHELP(nano_cancel_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY,
1223
1216
        NANO_NO_KEY, VIEW, NULL);
1224
1217
#endif
1225
1218
 
1244
1237
 
1245
1238
#ifndef NANO_TINY
1246
1239
/* Add a new toggle to the end of the global toggle list. */
1247
 
void toggle_init_one(int val, const char *desc, bool blank_after, long
1248
 
        flag)
 
1240
void toggle_init_one(int val
 
1241
#ifndef DISABLE_HELP
 
1242
        , const char *desc, bool blank_after
 
1243
#endif
 
1244
        , long flag)
1249
1245
{
1250
1246
    toggle *u;
1251
1247
 
1260
1256
    }
1261
1257
 
1262
1258
    u->val = val;
 
1259
#ifndef DISABLE_HELP
1263
1260
    u->desc = (desc == NULL) ? "" : _(desc);
1264
1261
    u->blank_after = blank_after;
 
1262
#endif
1265
1263
    u->flag = flag;
1266
1264
    u->next = NULL;
1267
1265
}
1274
1272
    if (toggles != NULL)
1275
1273
        return;
1276
1274
 
1277
 
    toggle_init_one(TOGGLE_NOHELP_KEY, N_("Help mode"), FALSE, NO_HELP);
 
1275
/* The following macro is to be used in calling toggle_init_one().  The
 
1276
 * point is that toggle_init_one() takes 4 arguments, unless
 
1277
 * DISABLE_HELP is defined, when the 2nd and 3rd ones should not be
 
1278
 * there. */
 
1279
#ifndef DISABLE_HELP
 
1280
#define IFTHELP(help, blank, nextvar) help, blank, nextvar
 
1281
#else
 
1282
#define IFTHELP(help, blank, nextvar) nextvar
 
1283
#endif
 
1284
 
 
1285
    toggle_init_one(TOGGLE_NOHELP_KEY, IFTHELP(N_("Help mode"), FALSE,
 
1286
        NO_HELP));
1278
1287
 
1279
1288
    toggle_init_one(TOGGLE_CONST_KEY,
1280
 
        N_("Constant cursor position display"), FALSE, CONST_UPDATE);
 
1289
        IFTHELP(N_("Constant cursor position display"), FALSE,
 
1290
        CONST_UPDATE));
1281
1291
 
1282
1292
    toggle_init_one(TOGGLE_MORESPACE_KEY,
1283
 
        N_("Use of more space for editing"), FALSE, MORE_SPACE);
1284
 
 
1285
 
    toggle_init_one(TOGGLE_SMOOTH_KEY, N_("Smooth scrolling"),
1286
 
#ifdef ENABLE_NANORC
1287
 
        FALSE
1288
 
#else
1289
 
        TRUE
1290
 
#endif
1291
 
        , SMOOTH_SCROLL);
1292
 
 
1293
 
#ifdef ENABLE_NANORC
1294
 
    toggle_init_one(TOGGLE_WHITESPACE_KEY, N_("Whitespace display"),
1295
 
#ifdef ENABLE_COLOR
1296
 
        FALSE
1297
 
#else
1298
 
        TRUE
1299
 
#endif
1300
 
        , WHITESPACE_DISPLAY);
1301
 
#endif
1302
 
 
1303
 
#ifdef ENABLE_COLOR
1304
 
    toggle_init_one(TOGGLE_SYNTAX_KEY, N_("Color syntax highlighting"),
1305
 
        TRUE, NO_COLOR_SYNTAX);
1306
 
#endif
1307
 
 
1308
 
    toggle_init_one(TOGGLE_SMARTHOME_KEY, N_("Smart home key"), FALSE,
1309
 
        SMART_HOME);
1310
 
 
1311
 
    toggle_init_one(TOGGLE_AUTOINDENT_KEY, N_("Auto indent"), FALSE,
1312
 
        AUTOINDENT);
1313
 
 
1314
 
    toggle_init_one(TOGGLE_CUTTOEND_KEY, N_("Cut to end"), FALSE,
1315
 
        CUT_TO_END);
 
1293
        IFTHELP(N_("Use of one more line for editing"), FALSE,
 
1294
        MORE_SPACE));
 
1295
 
 
1296
    toggle_init_one(TOGGLE_SMOOTH_KEY,
 
1297
#ifdef ENABLE_NANORC
 
1298
        IFTHELP(N_("Smooth scrolling"), FALSE, SMOOTH_SCROLL)
 
1299
#else
 
1300
        IFTHELP(N_("Smooth scrolling"), TRUE, SMOOTH_SCROLL)
 
1301
#endif
 
1302
        );
 
1303
 
 
1304
#ifdef ENABLE_NANORC
 
1305
    toggle_init_one(TOGGLE_WHITESPACE_KEY,
 
1306
#ifdef ENABLE_COLOR
 
1307
        IFTHELP(N_("Whitespace display"), FALSE, WHITESPACE_DISPLAY)
 
1308
#else
 
1309
        IFTHELP(N_("Whitespace display"), TRUE, WHITESPACE_DISPLAY)
 
1310
#endif
 
1311
        );
 
1312
#endif
 
1313
 
 
1314
#ifdef ENABLE_COLOR
 
1315
    toggle_init_one(TOGGLE_SYNTAX_KEY,
 
1316
        IFTHELP(N_("Color syntax highlighting"), TRUE, NO_COLOR_SYNTAX));
 
1317
#endif
 
1318
 
 
1319
    toggle_init_one(TOGGLE_SMARTHOME_KEY, IFTHELP(N_("Smart home key"),
 
1320
        FALSE, SMART_HOME));
 
1321
 
 
1322
    toggle_init_one(TOGGLE_AUTOINDENT_KEY, IFTHELP(N_("Auto indent"),
 
1323
        FALSE, AUTOINDENT));
 
1324
 
 
1325
    toggle_init_one(TOGGLE_CUTTOEND_KEY, IFTHELP(N_("Cut to end"),
 
1326
        FALSE, CUT_TO_END));
1316
1327
 
1317
1328
#ifndef DISABLE_WRAPPING
1318
 
    toggle_init_one(TOGGLE_WRAP_KEY, N_("Long line wrapping"), FALSE,
1319
 
        NO_WRAP);
 
1329
    toggle_init_one(TOGGLE_WRAP_KEY, IFTHELP(N_("Long line wrapping"),
 
1330
        FALSE, NO_WRAP));
1320
1331
#endif
1321
1332
 
1322
1333
    toggle_init_one(TOGGLE_TABSTOSPACES_KEY,
1323
 
        N_("Conversion of typed tabs to spaces"),
1324
 
#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_MOUSE)
1325
 
        !ISSET(RESTRICTED) ? TRUE : FALSE
 
1334
#ifndef DISABLE_MOUSE
 
1335
        IFTHELP(N_("Conversion of typed tabs to spaces"), TRUE,
 
1336
        TABS_TO_SPACES)
1326
1337
#else
1327
 
        FALSE
 
1338
        IFTHELP(N_("Conversion of typed tabs to spaces"),
 
1339
        !ISSET(RESTRICTED) ? TRUE : FALSE, TABS_TO_SPACES)
1328
1340
#endif
1329
 
        , TABS_TO_SPACES);
 
1341
        );
1330
1342
 
1331
1343
    /* If we're using restricted mode, the backup toggle is disabled.
1332
1344
     * It's useless since backups are disabled. */
1333
1345
    if (!ISSET(RESTRICTED))
1334
 
        toggle_init_one(TOGGLE_BACKUP_KEY, N_("Backup files"), FALSE,
1335
 
                BACKUP_FILE);
 
1346
        toggle_init_one(TOGGLE_BACKUP_KEY, IFTHELP(N_("Backup files"),
 
1347
                FALSE, BACKUP_FILE));
1336
1348
 
1337
1349
#ifdef ENABLE_MULTIBUFFER
1338
1350
    /* If we're using restricted mode, the multibuffer toggle is
1339
1351
     * disabled.  It's useless since inserting files is disabled. */
1340
1352
    if (!ISSET(RESTRICTED))
1341
1353
        toggle_init_one(TOGGLE_MULTIBUFFER_KEY,
1342
 
                N_("Multiple file buffers"), FALSE, MULTIBUFFER);
 
1354
                IFTHELP(N_("Multiple file buffers"), FALSE,
 
1355
                MULTIBUFFER));
1343
1356
#endif
1344
1357
 
1345
1358
#ifndef DISABLE_MOUSE
1346
 
    toggle_init_one(TOGGLE_MOUSE_KEY, N_("Mouse support"), FALSE,
1347
 
        USE_MOUSE);
 
1359
    toggle_init_one(TOGGLE_MOUSE_KEY, IFTHELP(N_("Mouse support"),
 
1360
        FALSE, USE_MOUSE));
1348
1361
#endif
1349
1362
 
1350
1363
    /* If we're using restricted mode, the DOS/Mac conversion toggle is
1351
1364
     * disabled.  It's useless since inserting files is disabled. */
1352
1365
    if (!ISSET(RESTRICTED))
1353
1366
        toggle_init_one(TOGGLE_NOCONVERT_KEY,
1354
 
                N_("No conversion from DOS/Mac format"), FALSE,
1355
 
                NO_CONVERT);
 
1367
                IFTHELP(N_("No conversion from DOS/Mac format"), FALSE,
 
1368
                NO_CONVERT));
1356
1369
 
1357
1370
    /* If we're using restricted mode, the suspend toggle is disabled.
1358
1371
     * It's useless since suspending is disabled. */
1359
1372
    if (!ISSET(RESTRICTED))
1360
 
        toggle_init_one(TOGGLE_SUSPEND_KEY, N_("Suspension"), FALSE,
1361
 
        SUSPEND);
 
1373
        toggle_init_one(TOGGLE_SUSPEND_KEY, IFTHELP(N_("Suspension"),
 
1374
        FALSE, SUSPEND));
1362
1375
}
1363
1376
#endif /* !NANO_TINY */
1364
1377