mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +03:00
tweaks: shorten the name of a symbol, to match its bindable function
This commit is contained in:
parent
9c4ebed3ff
commit
b9deb883fa
@ -315,7 +315,7 @@ void precalc_multicolorinfo(void)
|
||||
regmatch_t startmatch, endmatch;
|
||||
linestruct *line, *tailline;
|
||||
|
||||
if (openfile->syntax == NULL || ISSET(NO_COLOR_SYNTAX))
|
||||
if (openfile->syntax == NULL || ISSET(NO_SYNTAX))
|
||||
return;
|
||||
|
||||
/* For each line, allocate cache space for the multiline-regex info. */
|
||||
|
@ -1329,7 +1329,7 @@ void shortcut_init(void)
|
||||
#endif
|
||||
add_to_sclist(MMAIN, "M-P", 0, do_toggle_void, WHITESPACE_DISPLAY);
|
||||
#ifdef ENABLE_COLOR
|
||||
add_to_sclist(MMAIN, "M-Y", 0, do_toggle_void, NO_COLOR_SYNTAX);
|
||||
add_to_sclist(MMAIN, "M-Y", 0, do_toggle_void, NO_SYNTAX);
|
||||
#endif
|
||||
|
||||
/* Group of "Editing-behavior" toggles. */
|
||||
@ -1471,7 +1471,7 @@ const char *flagtostr(int flag)
|
||||
return N_("Soft wrapping of overlong lines");
|
||||
case WHITESPACE_DISPLAY:
|
||||
return N_("Whitespace display");
|
||||
case NO_COLOR_SYNTAX:
|
||||
case NO_SYNTAX:
|
||||
return N_("Color syntax highlighting");
|
||||
case SMART_HOME:
|
||||
return N_("Smart home key");
|
||||
|
@ -553,7 +553,7 @@ void help_init(void)
|
||||
if (s->toggle && s->ordinal == counter) {
|
||||
ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus == MMAIN ? s->keystr : ""),
|
||||
_(flagtostr(s->toggle)), _("enable/disable"));
|
||||
if (s->toggle == NO_COLOR_SYNTAX || s->toggle == TABS_TO_SPACES)
|
||||
if (s->toggle == NO_SYNTAX || s->toggle == TABS_TO_SPACES)
|
||||
ptr += sprintf(ptr, "\n");
|
||||
break;
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ void do_toggle(int flag)
|
||||
refresh_needed = TRUE;
|
||||
break;
|
||||
#ifdef ENABLE_COLOR
|
||||
case NO_COLOR_SYNTAX:
|
||||
case NO_SYNTAX:
|
||||
refresh_needed = TRUE;
|
||||
break;
|
||||
#endif
|
||||
@ -1099,7 +1099,7 @@ void do_toggle(int flag)
|
||||
|
||||
enabled = ISSET(flag);
|
||||
|
||||
if (flag == NO_HELP || flag == NO_COLOR_SYNTAX)
|
||||
if (flag == NO_HELP || flag == NO_SYNTAX)
|
||||
enabled = !enabled;
|
||||
|
||||
statusline(HUSH, "%s %s", _(flagtostr(flag)),
|
||||
|
@ -512,7 +512,7 @@ enum
|
||||
NO_CONVERT,
|
||||
BACKUP_FILE,
|
||||
INSECURE_BACKUP,
|
||||
NO_COLOR_SYNTAX,
|
||||
NO_SYNTAX,
|
||||
PRESERVE,
|
||||
HISTORYLOG,
|
||||
RESTRICTED,
|
||||
|
@ -455,7 +455,7 @@ keystruct *strtosc(const char *input)
|
||||
s->toggle = WHITESPACE_DISPLAY;
|
||||
#ifdef ENABLE_COLOR
|
||||
else if (!strcmp(input, "nosyntax"))
|
||||
s->toggle = NO_COLOR_SYNTAX;
|
||||
s->toggle = NO_SYNTAX;
|
||||
#endif
|
||||
else if (!strcmp(input, "smarthome"))
|
||||
s->toggle = SMART_HOME;
|
||||
|
@ -646,7 +646,7 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
|
||||
#ifdef ENABLE_COLOR
|
||||
/* When doing syntax coloring, the replacement might require
|
||||
* a change of colors, so refresh the whole edit window. */
|
||||
if (openfile->syntax && !ISSET(NO_COLOR_SYNTAX))
|
||||
if (openfile->syntax && !ISSET(NO_SYNTAX))
|
||||
edit_refresh();
|
||||
else
|
||||
#endif
|
||||
|
@ -2421,8 +2421,8 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
/* If color syntaxes are available and turned on, apply them. */
|
||||
if (openfile->syntax && !ISSET(NO_COLOR_SYNTAX)) {
|
||||
/* If there are color rules (and coloring is turned on), apply them. */
|
||||
if (openfile->syntax && !ISSET(NO_SYNTAX)) {
|
||||
const colortype *varnish = openfile->syntax->color;
|
||||
|
||||
/* If there are multiline regexes, make sure there is a cache. */
|
||||
@ -3259,7 +3259,7 @@ void edit_refresh(void)
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
/* When needed and useful, initialize the colors for the current syntax. */
|
||||
if (openfile->syntax && !have_palette && !ISSET(NO_COLOR_SYNTAX) && has_colors())
|
||||
if (openfile->syntax && !have_palette && !ISSET(NO_SYNTAX) && has_colors())
|
||||
prepare_palette();
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user