GNU bug report logs -
#59051
CC Mode 5.35.1 (C/*l); "Window scroll_bar" fontified as type
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Sat, 5 Nov 2022 12:36:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 59051 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> It's been some while since you submitted this bug report, but I now have
> a patch for it.
>
> On Sat, Nov 05, 2022 at 20:34:46 +0800, Po Lu via CC-Mode-help wrote:
>> Package: cc-mode
>
>> Go to src/xterm.c in the Emacs source code. Then, type M-> and keep
>> pressing M-v until the beginning of the buffer is reached. Afterwards,
>> go to line 14458, around which will be the following function
>> definition:
>
>> MAYBE_UNUSED static void
>> xi_select_scroll_bar_events (struct x_display_info *dpyinfo,
>> Window scroll_bar)
>> {
>> XIEventMask mask;
>> unsigned char *m;
>> ptrdiff_t length;
>
>> length = XIMaskLen (XI_LASTEVENT);
>> mask.mask = m = alloca (length);
>> memset (m, 0, length);
>> mask.mask_len = length;
>
>> "scroll_bar" in "Window scroll_bar" will be fontified as a type!
>
> What happens here is there's a macro invocation with the type "struct
> scroll_bar" as one of the arguments. This is in function
> x_scroll_bar_create, and the code there looks like:
>
> struct scroll_bar *bar = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, prev,
> PVEC_OTHER);
>
> .. This argument was enough to derail the fontification of scroll_bar
> throughout the buffer.
>
> Would you please do the usual with the attached patch, and let me know
> whether there are still problems with this bug. Thanks!
This one seems to be gone now, but I haven't had a chance to thoroughly
test yet.
Thanks.
This bug report was last modified 2 years and 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.