leave "Mark Text" and "Where Is Next" out entirely when NANO_SMALL is

defined; since they aren't in the visible main list, there's no point in
having them in but disabled; also add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-11-01 22:54:40 +00:00
parent 8381fdd83a
commit 4b4b608806
2 changed files with 28 additions and 33 deletions

View File

@ -134,6 +134,9 @@ CVS code -
N_(). (DLR) N_(). (DLR)
- Add new key aliases: F15 for "Mark Text" (DLR) and F16 for - Add new key aliases: F15 for "Mark Text" (DLR) and F16 for
"Where Is Next" (Chris). "Where Is Next" (Chris).
- Leave "Mark Text" and "Where Is Next" out entirely when
NANO_SMALL is defined. Since they aren't in the visible main
list, there's no point in having them in but disabled. (DLR)
- nano.c: - nano.c:
die_save_file() die_save_file()
- Clarify the error message when there are too many backup files - Clarify the error message when there are too many backup files

View File

@ -278,8 +278,10 @@ void shortcut_init(int unjustify)
const char *nano_spell_msg = N_("Invoke the spell checker, if available"); const char *nano_spell_msg = N_("Invoke the spell checker, if available");
const char *nano_gotoline_msg = N_("Go to a specific line number"); const char *nano_gotoline_msg = N_("Go to a specific line number");
const char *nano_replace_msg = N_("Replace text within the editor"); const char *nano_replace_msg = N_("Replace text within the editor");
#ifndef NANO_SMALL
const char *nano_mark_msg = N_("Mark text at the cursor position"); const char *nano_mark_msg = N_("Mark text at the cursor position");
const char *nano_whereis_next_msg = N_("Repeat last search"); const char *nano_whereis_next_msg = N_("Repeat last search");
#endif
const char *nano_prevline_msg = N_("Move to the previous line"); const char *nano_prevline_msg = N_("Move to the previous line");
const char *nano_nextline_msg = N_("Move to the next line"); const char *nano_nextline_msg = N_("Move to the next line");
const char *nano_forward_msg = N_("Move forward one character"); const char *nano_forward_msg = N_("Move forward one character");
@ -469,32 +471,22 @@ void shortcut_init(int unjustify)
nano_disabled_msg); nano_disabled_msg);
sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg, sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
IFHELP(nano_gotoline_msg, NANO_GOTOLINE_ALTKEY), NANO_GOTOLINE_FKEY, IFHELP(nano_gotoline_msg, NANO_GOTOLINE_ALTKEY),
NANO_NO_KEY, VIEW, do_gotoline_void); NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW, do_gotoline_void);
sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg, sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg,
IFHELP(nano_replace_msg, NANO_ALT_REPLACE_KEY), NANO_REPLACE_FKEY, IFHELP(nano_replace_msg, NANO_ALT_REPLACE_KEY),
NANO_NO_KEY, NOVIEW, do_replace); NANO_REPLACE_FKEY, NANO_NO_KEY, NOVIEW, do_replace);
#ifndef NANO_SMALL
sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"), sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"),
IFHELP(nano_mark_msg, NANO_MARK_ALTKEY), NANO_MARK_FKEY, IFHELP(nano_mark_msg, NANO_MARK_ALTKEY), NANO_MARK_FKEY,
NANO_NO_KEY, NOVIEW, NANO_NO_KEY, NOVIEW, do_mark);
#ifndef NANO_SMALL
do_mark
#else
nano_disabled_msg
#endif
);
sc_init_one(&main_list, NANO_NO_KEY, N_("Where Is Next"), sc_init_one(&main_list, NANO_NO_KEY, N_("Where Is Next"),
IFHELP(nano_whereis_next_msg, NANO_WHEREIS_NEXT_KEY), IFHELP(nano_whereis_next_msg, NANO_WHEREIS_NEXT_KEY),
NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research);
#ifndef NANO_SMALL
do_research
#else
nano_disabled_msg
#endif #endif
);
sc_init_one(&main_list, NANO_PREVLINE_KEY, N_("Prev Line"), sc_init_one(&main_list, NANO_PREVLINE_KEY, N_("Prev Line"),
IFHELP(nano_prevline_msg, NANO_NO_KEY), NANO_NO_KEY, IFHELP(nano_prevline_msg, NANO_NO_KEY), NANO_NO_KEY,
@ -579,8 +571,8 @@ void shortcut_init(int unjustify)
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
/* Translators: try to keep this string under 10 characters long */ /* Translators: try to keep this string under 10 characters long */
sc_init_one(&main_list, NANO_NO_KEY, fulljstify_msg, sc_init_one(&main_list, NANO_NO_KEY, fulljstify_msg,
IFHELP(nano_fulljustify_msg, NANO_FULLJUSTIFY_ALTKEY), NANO_NO_KEY, IFHELP(nano_fulljustify_msg, NANO_FULLJUSTIFY_ALTKEY),
NANO_NO_KEY, NOVIEW, do_full_justify); NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify);
#endif #endif
#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H) #if !defined(NANO_SMALL) && defined(HAVE_REGEX_H)
@ -639,8 +631,8 @@ void shortcut_init(int unjustify)
/* Translators: try to keep this string under 10 characters long */ /* Translators: try to keep this string under 10 characters long */
sc_init_one(&whereis_list, NANO_FULLJUSTIFY_KEY, fulljstify_msg, sc_init_one(&whereis_list, NANO_FULLJUSTIFY_KEY, fulljstify_msg,
IFHELP(nano_fulljustify_msg, NANO_FULLJUSTIFY_ALTKEY), NANO_NO_KEY, IFHELP(nano_fulljustify_msg, NANO_FULLJUSTIFY_ALTKEY),
NANO_NO_KEY, NOVIEW, do_full_justify); NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify);
#endif #endif
#ifndef NANO_SMALL #ifndef NANO_SMALL
@ -774,9 +766,9 @@ void shortcut_init(int unjustify)
IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_NO_KEY, IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_NO_KEY,
NANO_NO_KEY, VIEW, do_last_line); NANO_NO_KEY, VIEW, do_last_line);
sc_init_one(&gotoline_list, NANO_TOOTHERWHEREIS_KEY, N_("Go To Text"), sc_init_one(&gotoline_list, NANO_TOOTHERWHEREIS_KEY,
IFHELP(nano_whereis_msg, NANO_NO_KEY), NANO_NO_KEY, N_("Go To Text"), IFHELP(nano_whereis_msg, NANO_NO_KEY),
NANO_NO_KEY, VIEW, do_search); NANO_NO_KEY, NANO_NO_KEY, VIEW, do_search);
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
free_shortcutage(&help_list); free_shortcutage(&help_list);
@ -898,9 +890,9 @@ void shortcut_init(int unjustify)
* It's useless since inserting files is disabled. */ * It's useless since inserting files is disabled. */
/* Translators: try to keep this string under 22 characters long */ /* Translators: try to keep this string under 22 characters long */
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
sc_init_one(&insertfile_list, NANO_TOOTHERINSERT_KEY, N_("Execute Command"), sc_init_one(&insertfile_list, NANO_TOOTHERINSERT_KEY,
IFHELP(nano_execute_msg, NANO_NO_KEY), NANO_NO_KEY, N_("Execute Command"), IFHELP(nano_execute_msg,
NANO_NO_KEY, NOVIEW, 0); NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, NOVIEW, 0);
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
/* If we're using restricted mode, the multibuffer toggle is /* If we're using restricted mode, the multibuffer toggle is
@ -908,8 +900,8 @@ void shortcut_init(int unjustify)
/* Translators: try to keep this string under 22 characters long */ /* Translators: try to keep this string under 22 characters long */
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
sc_init_one(&insertfile_list, NANO_NO_KEY, new_buffer_msg, sc_init_one(&insertfile_list, NANO_NO_KEY, new_buffer_msg,
IFHELP(nano_multibuffer_msg, TOGGLE_MULTIBUFFER_KEY), NANO_NO_KEY, IFHELP(nano_multibuffer_msg, TOGGLE_MULTIBUFFER_KEY),
NANO_NO_KEY, NOVIEW, 0); NANO_NO_KEY, NANO_NO_KEY, NOVIEW, 0);
#endif #endif
#endif #endif
@ -954,8 +946,8 @@ void shortcut_init(int unjustify)
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
sc_init_one(&extcmd_list, NANO_NO_KEY, new_buffer_msg, sc_init_one(&extcmd_list, NANO_NO_KEY, new_buffer_msg,
IFHELP(nano_multibuffer_msg, TOGGLE_MULTIBUFFER_KEY), NANO_NO_KEY, IFHELP(nano_multibuffer_msg, TOGGLE_MULTIBUFFER_KEY),
NANO_NO_KEY, NOVIEW, 0); NANO_NO_KEY, NANO_NO_KEY, NOVIEW, 0);
#endif #endif
#endif #endif
@ -986,8 +978,8 @@ void shortcut_init(int unjustify)
/* Translators: try to keep this string under 22 characters long */ /* Translators: try to keep this string under 22 characters long */
sc_init_one(&browser_list, NANO_GOTOLINE_KEY, N_("Go To Dir"), sc_init_one(&browser_list, NANO_GOTOLINE_KEY, N_("Go To Dir"),
IFHELP(nano_gotodir_msg, NANO_GOTOLINE_ALTKEY), NANO_GOTOLINE_FKEY, IFHELP(nano_gotodir_msg, NANO_GOTOLINE_ALTKEY),
NANO_NO_KEY, VIEW, 0); NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW, 0);
free_shortcutage(&gotodir_list); free_shortcutage(&gotodir_list);