bug#59070: CC Mode 5.35.1 (C/*l); Failure to completely fontify struct type
Po Lu via CC-Mode-help <[email protected]> Thu, 10 Nov 2022 10:54:23 +0800
| Newsgroups | gmane.emacs.cc-mode.general |
|---|---|
| Message-ID | <[email protected]> |
Alan Mackenzie <[email protected]> writes: > Hello, Po. > > On Sun, Nov 06, 2022 at 15:56:15 +0800, Po Lu via CC-Mode-help wrote: >> Package: cc-mode > >> Start with the following text in a c-mode buffer: > >> static const struct test_seat_controller_interface seat_controller_impl = >> { >> .destroy = DestroyTestSeatController, >> .bind_seat = BindSeat, >> .get_XIModifierState = GetXIModifierState, >> .get_XIButtonState = GetXIButtonState, >> .get_XIValuatorState = GetXIValuatorState, >> .dispatch_XI_Enter = DispatchXIEnter, >> .dispatch_XI_Leave = DispatchXILeave, >> .dispatch_XI_Motion = DispatchXIMotion, >> .dispatch_XI_ButtonPress = DispatchXIButtonPress, >> .dispatch_XI_ButtonRelease = DispatchXIButtonRelease, >> }; > >> move point to the end of the line reading ".dispatch_XI_ButtonPress = >> DispatchXIButtonRelease", and then type RET. At that point, >> "test_seat_controller_interface" will no longer be completely fontified >> as a type. > > Yes. The position inside that identifier where the fontification > stopped was exactly 500 characters back from the start of the new line. > This made it easy to locate a 500 in the Lisp source causing it. It > turned out to be an off-by-one error. > > Would you please apply the attached patch, and confirm the bug is fixed > (or say what's still wrong). > > 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) > > [ .... ] That seems to work here, thanks.