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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello, Po.
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!
> Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu)
> of 2022-10-29
> Package: CC Mode 5.35.1 (C/*l)
> Buffer Style: GNU
> c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties category-properties 1-bit)
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
[diff.20221118.diff (text/plain, attachment)]
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.