tweaks: shorten the name of a symbol, to match its bindable function

master
Benno Schulenberg 2020-05-01 13:25:15 +02:00
parent 9c4ebed3ff
commit b9deb883fa
8 changed files with 12 additions and 12 deletions

View File

@ -315,7 +315,7 @@ void precalc_multicolorinfo(void)
regmatch_t startmatch, endmatch; regmatch_t startmatch, endmatch;
linestruct *line, *tailline; linestruct *line, *tailline;
if (openfile->syntax == NULL || ISSET(NO_COLOR_SYNTAX)) if (openfile->syntax == NULL || ISSET(NO_SYNTAX))
return; return;
/* For each line, allocate cache space for the multiline-regex info. */ /* For each line, allocate cache space for the multiline-regex info. */

View File

@ -1329,7 +1329,7 @@ void shortcut_init(void)
#endif #endif
add_to_sclist(MMAIN, "M-P", 0, do_toggle_void, WHITESPACE_DISPLAY); add_to_sclist(MMAIN, "M-P", 0, do_toggle_void, WHITESPACE_DISPLAY);
#ifdef ENABLE_COLOR #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 #endif
/* Group of "Editing-behavior" toggles. */ /* Group of "Editing-behavior" toggles. */
@ -1471,7 +1471,7 @@ const char *flagtostr(int flag)
return N_("Soft wrapping of overlong lines"); return N_("Soft wrapping of overlong lines");
case WHITESPACE_DISPLAY: case WHITESPACE_DISPLAY:
return N_("Whitespace display"); return N_("Whitespace display");
case NO_COLOR_SYNTAX: case NO_SYNTAX:
return N_("Color syntax highlighting"); return N_("Color syntax highlighting");
case SMART_HOME: case SMART_HOME:
return N_("Smart home key"); return N_("Smart home key");

View File

@ -553,7 +553,7 @@ void help_init(void)
if (s->toggle && s->ordinal == counter) { if (s->toggle && s->ordinal == counter) {
ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus == MMAIN ? s->keystr : ""), ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus == MMAIN ? s->keystr : ""),
_(flagtostr(s->toggle)), _("enable/disable")); _(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"); ptr += sprintf(ptr, "\n");
break; break;
} }

View File

@ -1091,7 +1091,7 @@ void do_toggle(int flag)
refresh_needed = TRUE; refresh_needed = TRUE;
break; break;
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
case NO_COLOR_SYNTAX: case NO_SYNTAX:
refresh_needed = TRUE; refresh_needed = TRUE;
break; break;
#endif #endif
@ -1099,7 +1099,7 @@ void do_toggle(int flag)
enabled = ISSET(flag); enabled = ISSET(flag);
if (flag == NO_HELP || flag == NO_COLOR_SYNTAX) if (flag == NO_HELP || flag == NO_SYNTAX)
enabled = !enabled; enabled = !enabled;
statusline(HUSH, "%s %s", _(flagtostr(flag)), statusline(HUSH, "%s %s", _(flagtostr(flag)),

View File

@ -512,7 +512,7 @@ enum
NO_CONVERT, NO_CONVERT,
BACKUP_FILE, BACKUP_FILE,
INSECURE_BACKUP, INSECURE_BACKUP,
NO_COLOR_SYNTAX, NO_SYNTAX,
PRESERVE, PRESERVE,
HISTORYLOG, HISTORYLOG,
RESTRICTED, RESTRICTED,

View File

@ -455,7 +455,7 @@ keystruct *strtosc(const char *input)
s->toggle = WHITESPACE_DISPLAY; s->toggle = WHITESPACE_DISPLAY;
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
else if (!strcmp(input, "nosyntax")) else if (!strcmp(input, "nosyntax"))
s->toggle = NO_COLOR_SYNTAX; s->toggle = NO_SYNTAX;
#endif #endif
else if (!strcmp(input, "smarthome")) else if (!strcmp(input, "smarthome"))
s->toggle = SMART_HOME; s->toggle = SMART_HOME;

View File

@ -646,7 +646,7 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
/* When doing syntax coloring, the replacement might require /* When doing syntax coloring, the replacement might require
* a change of colors, so refresh the whole edit window. */ * 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(); edit_refresh();
else else
#endif #endif

View File

@ -2421,8 +2421,8 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
#endif #endif
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
/* If color syntaxes are available and turned on, apply them. */ /* If there are color rules (and coloring is turned on), apply them. */
if (openfile->syntax && !ISSET(NO_COLOR_SYNTAX)) { if (openfile->syntax && !ISSET(NO_SYNTAX)) {
const colortype *varnish = openfile->syntax->color; const colortype *varnish = openfile->syntax->color;
/* If there are multiline regexes, make sure there is a cache. */ /* If there are multiline regexes, make sure there is a cache. */
@ -3259,7 +3259,7 @@ void edit_refresh(void)
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
/* When needed and useful, initialize the colors for the current syntax. */ /* 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(); prepare_palette();
#endif #endif