Skip to content

Commit 8820b48

Browse files
committed
patch 8.0.0466: still macros that should be all-caps
Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps.
1 parent 40ebc0a commit 8820b48

33 files changed

Lines changed: 259 additions & 264 deletions

src/buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6021,7 +6021,7 @@ sign_list_placed(buf_T *rbuf)
60216021
if (buf->b_signlist != NULL)
60226022
{
60236023
vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname);
6024-
MSG_PUTS_ATTR(lbuf, hl_attr(HLF_D));
6024+
MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
60256025
msg_putchar('\n');
60266026
}
60276027
for (p = buf->b_signlist; p != NULL && !got_int; p = p->next)

src/edit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,7 @@ edit_putchar(int c, int highlight)
17711771
update_topline(); /* just in case w_topline isn't valid */
17721772
validate_cursor();
17731773
if (highlight)
1774-
attr = hl_attr(HLF_8);
1774+
attr = HL_ATTR(HLF_8);
17751775
else
17761776
attr = 0;
17771777
pc_row = W_WINROW(curwin) + curwin->w_wrow;
@@ -2256,7 +2256,7 @@ has_compl_option(int dict_opt)
22562256
edit_submode = NULL;
22572257
msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty")
22582258
: (char_u *)_("'thesaurus' option is empty"),
2259-
hl_attr(HLF_E));
2259+
HL_ATTR(HLF_E));
22602260
if (emsg_silent == 0)
22612261
{
22622262
vim_beep(BO_COMPL);
@@ -3252,7 +3252,7 @@ ins_compl_files(
32523252
{
32533253
vim_snprintf((char *)IObuff, IOSIZE,
32543254
_("Scanning dictionary: %s"), (char *)files[i]);
3255-
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
3255+
(void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
32563256
}
32573257

32583258
if (fp != NULL)
@@ -4344,7 +4344,7 @@ ins_compl_get_exp(pos_T *ini)
43444344
: ins_buf->b_sfname == NULL
43454345
? ins_buf->b_fname
43464346
: ins_buf->b_sfname);
4347-
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
4347+
(void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
43484348
}
43494349
else if (*e_cpt == NUL)
43504350
break;
@@ -4374,7 +4374,7 @@ ins_compl_get_exp(pos_T *ini)
43744374
{
43754375
type = CTRL_X_TAGS;
43764376
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
4377-
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
4377+
(void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
43784378
}
43794379
else
43804380
type = -1;
@@ -5693,7 +5693,7 @@ ins_complete(int c, int enable_pum)
56935693
if (!p_smd)
56945694
msg_attr(edit_submode_extra,
56955695
edit_submode_highl < HLF_COUNT
5696-
? hl_attr(edit_submode_highl) : 0);
5696+
? HL_ATTR(edit_submode_highl) : 0);
56975697
}
56985698
else
56995699
msg_clr_cmdline(); /* necessary for "noshowmode" */

src/ex_cmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,7 +2889,7 @@ print_line_no_prefix(
28892889
{
28902890
vim_snprintf((char *)numbuf, sizeof(numbuf),
28912891
"%*ld ", number_width(curwin), (long)lnum);
2892-
msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
2892+
msg_puts_attr(numbuf, HL_ATTR(HLF_N)); /* Highlight line nrs */
28932893
}
28942894
msg_prt_line(ml_get(lnum), list);
28952895
}
@@ -5379,7 +5379,7 @@ do_sub(exarg_T *eap)
53795379
msg_no_more = TRUE;
53805380
/* write message same highlighting as for
53815381
* wait_return */
5382-
smsg_attr(hl_attr(HLF_R),
5382+
smsg_attr(HL_ATTR(HLF_R),
53835383
(char_u *)_("replace with %s (y/n/a/q/l/^E/^Y)?"), sub);
53845384
msg_no_more = FALSE;
53855385
msg_scroll = i;
@@ -8284,7 +8284,7 @@ ex_smile(exarg_T *eap UNUSED)
82848284
else
82858285
for (n = *p++; n > 0; --n)
82868286
if (*p == 'o' || *p == '$')
8287-
msg_putchar_attr(*p, hl_attr(HLF_L));
8287+
msg_putchar_attr(*p, HL_ATTR(HLF_L));
82888288
else
82898289
msg_putchar(*p);
82908290
msg_clr_eos();

src/ex_cmds2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,7 +2230,7 @@ buf_write_all(buf_T *buf, int forceit)
22302230
#ifdef FEAT_AUTOCMD
22312231
if (curbuf != old_curbuf)
22322232
{
2233-
msg_source(hl_attr(HLF_W));
2233+
msg_source(HL_ATTR(HLF_W));
22342234
MSG(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
22352235
}
22362236
#endif
@@ -4733,7 +4733,7 @@ get_one_sourceline(struct source_cookie *sp)
47334733
{
47344734
if (!sp->error)
47354735
{
4736-
msg_source(hl_attr(HLF_W));
4736+
msg_source(HL_ATTR(HLF_W));
47374737
EMSG(_("W15: Warning: Wrong line separator, ^M may be missing"));
47384738
}
47394739
sp->error = TRUE;

src/ex_docmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6032,7 +6032,7 @@ uc_list(char_u *name, size_t name_len)
60326032
msg_putchar(gap != &ucmds ? 'b' : ' ');
60336033
msg_putchar(' ');
60346034

6035-
msg_outtrans_attr(cmd->uc_name, hl_attr(HLF_D));
6035+
msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
60366036
len = (int)STRLEN(cmd->uc_name) + 4;
60376037

60386038
do {
@@ -8480,7 +8480,7 @@ ex_tabs(exarg_T *eap UNUSED)
84808480
{
84818481
msg_putchar('\n');
84828482
vim_snprintf((char *)IObuff, IOSIZE, _("Tab page %d"), tabcount++);
8483-
msg_outtrans_attr(IObuff, hl_attr(HLF_T));
8483+
msg_outtrans_attr(IObuff, HL_ATTR(HLF_T));
84848484
out_flush(); /* output one line at a time */
84858485
ui_breakcheck();
84868486

src/ex_getln.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4178,14 +4178,14 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
41784178
lines = (num_files + columns - 1) / columns;
41794179
}
41804180

4181-
attr = hl_attr(HLF_D); /* find out highlighting for directories */
4181+
attr = HL_ATTR(HLF_D); /* find out highlighting for directories */
41824182

41834183
if (xp->xp_context == EXPAND_TAGS_LISTFILES)
41844184
{
4185-
MSG_PUTS_ATTR(_("tagname"), hl_attr(HLF_T));
4185+
MSG_PUTS_ATTR(_("tagname"), HL_ATTR(HLF_T));
41864186
msg_clr_eos();
41874187
msg_advance(maxlen - 3);
4188-
MSG_PUTS_ATTR(_(" kind file\n"), hl_attr(HLF_T));
4188+
MSG_PUTS_ATTR(_(" kind file\n"), HL_ATTR(HLF_T));
41894189
}
41904190

41914191
/* list the files line by line */
@@ -4196,12 +4196,12 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
41964196
{
41974197
if (xp->xp_context == EXPAND_TAGS_LISTFILES)
41984198
{
4199-
msg_outtrans_attr(files_found[k], hl_attr(HLF_D));
4199+
msg_outtrans_attr(files_found[k], HL_ATTR(HLF_D));
42004200
p = files_found[k] + STRLEN(files_found[k]) + 1;
42014201
msg_advance(maxlen + 1);
42024202
msg_puts(p);
42034203
msg_advance(maxlen + 3);
4204-
msg_puts_long_attr(p + 2, hl_attr(HLF_D));
4204+
msg_puts_long_attr(p + 2, HL_ATTR(HLF_D));
42054205
break;
42064206
}
42074207
for (j = maxlen - lastlen; --j >= 0; )

src/farsi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ conv_to_pvim(void)
17191719

17201720
/* Assume the screen has been messed up: clear it and redraw. */
17211721
redraw_later(CLEAR);
1722-
MSG_ATTR(farsi_text_1, hl_attr(HLF_S));
1722+
MSG_ATTR(farsi_text_1, HL_ATTR(HLF_S));
17231723
}
17241724

17251725
/*
@@ -1747,7 +1747,7 @@ conv_to_pstd(void)
17471747

17481748
/* Assume the screen has been messed up: clear it and redraw. */
17491749
redraw_later(CLEAR);
1750-
MSG_ATTR(farsi_text_2, hl_attr(HLF_S));
1750+
MSG_ATTR(farsi_text_2, HL_ATTR(HLF_S));
17511751
}
17521752

17531753
/*

src/fileio.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5044,7 +5044,7 @@ buf_write(
50445044
{
50455045
int numlen = errnum != NULL ? (int)STRLEN(errnum) : 0;
50465046

5047-
attr = hl_attr(HLF_E); /* set highlight for error messages */
5047+
attr = HL_ATTR(HLF_E); /* set highlight for error messages */
50485048
msg_add_fname(buf,
50495049
#ifndef UNIX
50505050
sfname
@@ -5300,7 +5300,7 @@ check_mtime(buf_T *buf, stat_T *st)
53005300
msg_silent = 0; /* must give this prompt */
53015301
/* don't use emsg() here, don't want to flush the buffers */
53025302
MSG_ATTR(_("WARNING: The file has been changed since reading it!!!"),
5303-
hl_attr(HLF_E));
5303+
HL_ATTR(HLF_E));
53045304
if (ask_yesno((char_u *)_("Do you really want to write to it"),
53055305
TRUE) == 'n')
53065306
return FAIL;
@@ -7011,10 +7011,10 @@ buf_check_timestamp(
70117011
# endif
70127012
{
70137013
msg_start();
7014-
msg_puts_attr(tbuf, hl_attr(HLF_E) + MSG_HIST);
7014+
msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
70157015
if (*mesg2 != NUL)
70167016
msg_puts_attr((char_u *)mesg2,
7017-
hl_attr(HLF_W) + MSG_HIST);
7017+
HL_ATTR(HLF_W) + MSG_HIST);
70187018
msg_clr_eos();
70197019
(void)msg_end();
70207020
if (emsg_silent == 0)
@@ -7840,12 +7840,12 @@ show_autocmd(AutoPat *ap, event_T event)
78407840
if (ap->group != AUGROUP_DEFAULT)
78417841
{
78427842
if (AUGROUP_NAME(ap->group) == NULL)
7843-
msg_puts_attr(get_deleted_augroup(), hl_attr(HLF_E));
7843+
msg_puts_attr(get_deleted_augroup(), HL_ATTR(HLF_E));
78447844
else
7845-
msg_puts_attr(AUGROUP_NAME(ap->group), hl_attr(HLF_T));
7845+
msg_puts_attr(AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
78467846
msg_puts((char_u *)" ");
78477847
}
7848-
msg_puts_attr(event_nr2name(event), hl_attr(HLF_T));
7848+
msg_puts_attr(event_nr2name(event), HL_ATTR(HLF_T));
78497849
last_event = event;
78507850
last_group = ap->group;
78517851
msg_putchar('\n');

src/getchar.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4022,9 +4022,9 @@ showmap(
40224022
} while (len < 12);
40234023

40244024
if (mp->m_noremap == REMAP_NONE)
4025-
msg_puts_attr((char_u *)"*", hl_attr(HLF_8));
4025+
msg_puts_attr((char_u *)"*", HL_ATTR(HLF_8));
40264026
else if (mp->m_noremap == REMAP_SCRIPT)
4027-
msg_puts_attr((char_u *)"&", hl_attr(HLF_8));
4027+
msg_puts_attr((char_u *)"&", HL_ATTR(HLF_8));
40284028
else
40294029
msg_putchar(' ');
40304030

@@ -4036,7 +4036,7 @@ showmap(
40364036
/* Use FALSE below if we only want things like <Up> to show up as such on
40374037
* the rhs, and not M-x etc, TRUE gets both -- webb */
40384038
if (*mp->m_str == NUL)
4039-
msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8));
4039+
msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
40404040
else
40414041
{
40424042
/* Remove escaping of CSI, because "m_str" is in a format to be used

src/gui_beval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ set_printable_label_text(GtkLabel *label, char_u *text)
10541054
#endif
10551055

10561056
/* Look up the RGB values of the SpecialKey foreground color. */
1057-
aep = syn_gui_attr2entry(hl_attr(HLF_8));
1057+
aep = syn_gui_attr2entry(HL_ATTR(HLF_8));
10581058
pixel = (aep != NULL) ? aep->ae_u.gui.fg_color : INVALCOLOR;
10591059
if (pixel != INVALCOLOR)
10601060
# if GTK_CHECK_VERSION(3,0,0)

0 commit comments

Comments
 (0)