tweaks: rename a symbol, to match the corresponding renamed option
parent
a91bc04e04
commit
02efc760bf
|
@ -1335,7 +1335,7 @@ void shortcut_init(void)
|
||||||
#ifdef ENABLE_MOUSE
|
#ifdef ENABLE_MOUSE
|
||||||
add_to_sclist(MMAIN, "M-M", 0, do_toggle_void, USE_MOUSE);
|
add_to_sclist(MMAIN, "M-M", 0, do_toggle_void, USE_MOUSE);
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MMAIN, "M-Z", 0, do_toggle_void, SUSPEND);
|
add_to_sclist(MMAIN, "M-Z", 0, do_toggle_void, SUSPENDABLE);
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
|
|
||||||
add_to_sclist(((MMOST & ~MMAIN) | MYESNO), "^C", 0, do_cancel, 0);
|
add_to_sclist(((MMOST & ~MMAIN) | MYESNO), "^C", 0, do_cancel, 0);
|
||||||
|
@ -1475,7 +1475,7 @@ const char *flagtostr(int flag)
|
||||||
return N_("Conversion of typed tabs to spaces");
|
return N_("Conversion of typed tabs to spaces");
|
||||||
case USE_MOUSE:
|
case USE_MOUSE:
|
||||||
return N_("Mouse support");
|
return N_("Mouse support");
|
||||||
case SUSPEND:
|
case SUSPENDABLE:
|
||||||
return N_("Suspension");
|
return N_("Suspension");
|
||||||
case LINE_NUMBERS:
|
case LINE_NUMBERS:
|
||||||
return N_("Line numbering");
|
return N_("Line numbering");
|
||||||
|
|
12
src/nano.c
12
src/nano.c
|
@ -979,7 +979,7 @@ void signal_init(void)
|
||||||
sigaction(SIGWINCH, &deed, NULL);
|
sigaction(SIGWINCH, &deed, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ISSET(SUSPEND)) {
|
if (ISSET(SUSPENDABLE)) {
|
||||||
/* Block all other signals in the suspend and continue handlers.
|
/* Block all other signals in the suspend and continue handlers.
|
||||||
* If we don't do this, other stuff interrupts them! */
|
* If we don't do this, other stuff interrupts them! */
|
||||||
sigfillset(&deed.sa_mask);
|
sigfillset(&deed.sa_mask);
|
||||||
|
@ -1052,7 +1052,7 @@ RETSIGTYPE do_suspend(int signal)
|
||||||
/* Put nano to sleep (if suspension is enabled). */
|
/* Put nano to sleep (if suspension is enabled). */
|
||||||
void do_suspend_void(void)
|
void do_suspend_void(void)
|
||||||
{
|
{
|
||||||
if (ISSET(SUSPEND))
|
if (ISSET(SUSPENDABLE))
|
||||||
do_suspend(0);
|
do_suspend(0);
|
||||||
else {
|
else {
|
||||||
statusbar(_("Suspension is not enabled"));
|
statusbar(_("Suspension is not enabled"));
|
||||||
|
@ -1151,7 +1151,7 @@ void do_toggle(int flag)
|
||||||
{
|
{
|
||||||
bool enabled;
|
bool enabled;
|
||||||
|
|
||||||
if (flag == SUSPEND && in_restricted_mode())
|
if (flag == SUSPENDABLE && in_restricted_mode())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TOGGLE(flag);
|
TOGGLE(flag);
|
||||||
|
@ -1167,7 +1167,7 @@ void do_toggle(int flag)
|
||||||
mouse_init();
|
mouse_init();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case SUSPEND:
|
case SUSPENDABLE:
|
||||||
signal_init();
|
signal_init();
|
||||||
break;
|
break;
|
||||||
case SOFTWRAP:
|
case SOFTWRAP:
|
||||||
|
@ -2112,7 +2112,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'z':
|
case 'z':
|
||||||
SET(SUSPEND);
|
SET(SUSPENDABLE);
|
||||||
break;
|
break;
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
case '$':
|
case '$':
|
||||||
|
@ -2239,7 +2239,7 @@ int main(int argc, char **argv)
|
||||||
* since they allow writing to files not specified on the command line. */
|
* since they allow writing to files not specified on the command line. */
|
||||||
if (ISSET(RESTRICTED)) {
|
if (ISSET(RESTRICTED)) {
|
||||||
UNSET(BACKUP_FILE);
|
UNSET(BACKUP_FILE);
|
||||||
UNSET(SUSPEND);
|
UNSET(SUSPENDABLE);
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
UNSET(HISTORYLOG);
|
UNSET(HISTORYLOG);
|
||||||
UNSET(POSITIONLOG);
|
UNSET(POSITIONLOG);
|
||||||
|
|
|
@ -493,7 +493,7 @@ enum
|
||||||
CASE_SENSITIVE,
|
CASE_SENSITIVE,
|
||||||
CONSTANT_SHOW,
|
CONSTANT_SHOW,
|
||||||
NO_HELP,
|
NO_HELP,
|
||||||
SUSPEND,
|
SUSPENDABLE,
|
||||||
NO_WRAP,
|
NO_WRAP,
|
||||||
AUTOINDENT,
|
AUTOINDENT,
|
||||||
VIEW_MODE,
|
VIEW_MODE,
|
||||||
|
|
|
@ -89,8 +89,8 @@ static const rcoption rcopts[] = {
|
||||||
#ifdef ENABLE_SPELLER
|
#ifdef ENABLE_SPELLER
|
||||||
{"speller", 0},
|
{"speller", 0},
|
||||||
#endif
|
#endif
|
||||||
{"suspend", SUSPEND}, /* Deprecated; remove in 2022. */
|
{"suspend", SUSPENDABLE}, /* Deprecated; remove in 2022. */
|
||||||
{"suspendable", SUSPEND},
|
{"suspendable", SUSPENDABLE},
|
||||||
{"tabsize", 0},
|
{"tabsize", 0},
|
||||||
{"tempfile", TEMP_FILE},
|
{"tempfile", TEMP_FILE},
|
||||||
{"view", VIEW_MODE},
|
{"view", VIEW_MODE},
|
||||||
|
@ -467,7 +467,7 @@ keystruct *strtosc(const char *input)
|
||||||
s->toggle = USE_MOUSE;
|
s->toggle = USE_MOUSE;
|
||||||
#endif
|
#endif
|
||||||
else if (!strcmp(input, "suspendenable"))
|
else if (!strcmp(input, "suspendenable"))
|
||||||
s->toggle = SUSPEND;
|
s->toggle = SUSPENDABLE;
|
||||||
else
|
else
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue