diff options
author | Alan Mackenzie <acm@muc.de> | 2022-08-31 18:46:06 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2022-08-31 18:46:06 +0000 |
commit | 71b7ad0cf7dc85b786ba225ff84f842459ba4581 (patch) | |
tree | 813ff61247733d16c8ef1e962ac0b975130383db /lisp/emacs-lisp/backtrace.el | |
parent | dbfe57472e4b56c8e9b72b1714492bfb0c005213 (diff) | |
download | emacs-71b7ad0cf7dc85b786ba225ff84f842459ba4581.tar.gz emacs-71b7ad0cf7dc85b786ba225ff84f842459ba4581.tar.bz2 emacs-71b7ad0cf7dc85b786ba225ff84f842459ba4581.zip |
C++ Mode: Fontify functions correctly with commas in template expressions
This fixes bug #57318.
Also apply an optimization which marks generic expressions as already
analyzed, thus avoiding repeating this analysis when not needed. This
optimization prevents the fix slowing down scrolling when the C++ source has
lots of template structures.
* lisp/progmodes/cc-engine.el (top-level) Near the beginning of the file, add
a comment describing the new text property c-<>-c-types-set.
(c-update-brace-stack): Bind c-restricted-<>-arglists to nil rather than t
around the call to c-forward-<>-arglist.
(c-forward-<>-arglist-recur): Allow the abbreviated analysis of a generic
expression also when the opening < is marked with a c-<>-c-types-set text
property. Set this property at the same time as the c-type properties are set
on the commas inside the template structure.
* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Clear the
c-<>-c-types-set text property, along with c-type, from the region being
fontified.
Diffstat (limited to 'lisp/emacs-lisp/backtrace.el')
0 files changed, 0 insertions, 0 deletions