1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00
emacs/lisp/progmodes
Alan Mackenzie 51719617eb CC Mode: Fontify "found types" which are recognized after being first scanned
This aims to fix the scenario where on jit-lock's first scan of a type, it is
not recognized as such, and only later does this happen.  The fontification of
such found types is now done by background scanning in short time slices
immediately after initialising the mode.

* lisp/progmodes/cc-engine.el (c-add-type-1): New function.
(c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for
protecting c-found-types from excessive partial identifiers.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Remove the
code which cleared c-found-types on fontification at BOB.
(c-find-types-background): New function, based on c-font-lock-declarations).
(c-types-finder-timer-func): New function.
(c-re-redisplay-timer): New variable.
(c-force-redisplay, c-fontify-new-found-type): New functions.

* lisp/progmodes/cc-mode.el (c-type-finder-timer): New variable.
(c-leave-cc-mode-mode): Nullify c-post-command-hook and c-type-finder-timer
when the last CC Mode buffer of a session is killed.
(c-type-finder-pos): New variable.
(c-basic-common-init): Initialize c-type-finder-pos and c-type-finder-timer.
(c-new-id-start, c-new-id-end, c-new-id-is-type): New variables.
(c-update-new-id): New function.
(c-post-command): New post command hook function, used for checking moving
away from partially typed identifiers, and making them full identifiers.
(c-before-change): Add code to clear c-found-types on a buffer change at BOB.
(c-after-change): Call c-update-new-id to keep track of partially typed
identifiers.

* doc/misc/cc-mode.texi (Found Types): New @section in the @Chapter Font
Locking.

* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): New customizable
options.
2021-10-22 19:55:01 +00:00
..
antlr-mode.el Use command substitution instead of raw keys in more places 2021-09-24 21:26:08 +02:00
asm-mode.el
autoconf.el Fontify Libtool macros in autoconf-mode 2021-09-18 13:12:32 +01:00
bat-mode.el ; Minor doc fixes found by checkdoc 2021-09-13 06:44:52 +02:00
bug-reference.el Merge from origin/emacs-28 2021-10-22 09:39:39 -07:00
cc-align.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
cc-awk.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
cc-bytecomp.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
cc-cmds.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
cc-defs.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
cc-engine.el CC Mode: Fontify "found types" which are recognized after being first scanned 2021-10-22 19:55:01 +00:00
cc-fonts.el CC Mode: Fontify "found types" which are recognized after being first scanned 2021-10-22 19:55:01 +00:00
cc-guess.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
cc-langs.el ; Remove various duplicated words 2021-09-25 20:25:01 +02:00
cc-menus.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
cc-mode.el CC Mode: Fontify "found types" which are recognized after being first scanned 2021-10-22 19:55:01 +00:00
cc-styles.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
cc-vars.el CC Mode: Fontify "found types" which are recognized after being first scanned 2021-10-22 19:55:01 +00:00
cfengine.el ; Minor doc fixes found by checkdoc 2021-09-13 06:44:52 +02:00
cl-font-lock.el ; Normalize some header comments 2021-09-16 15:42:44 +02:00
cmacexp.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
compile.el Merge from origin/emacs-28 2021-10-16 09:18:37 -07:00
cperl-mode.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
cpp.el Use format-prompt for many more prompts 2021-10-05 03:44:56 +02:00
cwarn.el
dcl-mode.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
ebnf-abn.el Fix abnf parsing of <prose> elements 2021-08-31 03:17:21 +02:00
ebnf-bnf.el
ebnf-dtd.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
ebnf-ebx.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
ebnf-iso.el
ebnf-otz.el
ebnf-yac.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
ebnf2ps.el ; Normalize some header comments 2021-09-16 15:42:44 +02:00
ebrowse.el Use format-prompt for many more prompts 2021-10-05 03:44:56 +02:00
elisp-mode.el Fix xref elisp identifier namespace mistake 2021-10-18 17:26:45 +02:00
erts-mode.el Fix one-clause movement in erts-mode--goto-start-of-test 2021-10-01 15:38:35 +02:00
etags.el Use format-prompt for many more prompts 2021-10-05 03:44:56 +02:00
executable.el
f90.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
flymake-cc.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
flymake-proc.el ; Adjust overly long docstrings to fit 80 characters 2021-09-26 13:23:57 +02:00
flymake.el * lisp/progmodes/flymake.el (flymake-menu): Don't use obsolete name. 2021-09-27 16:00:32 +02:00
fortran.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
gdb-mi.el Mark def* macros for indentation 2021-10-13 21:52:57 +02:00
glasses.el
grep.el Use format-prompt for many more prompts 2021-10-05 03:44:56 +02:00
gud.el Mark def* macros for indentation 2021-10-13 21:52:57 +02:00
hideif.el Use format-prompt for many more prompts 2021-10-05 03:44:56 +02:00
hideshow.el ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
icon.el
idlw-complete-structtag.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
idlw-help.el Make two unused variables obsolete 2021-09-19 16:57:03 +02:00
idlw-shell.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
idlw-toolbar.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
idlwave.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
inf-lisp.el
js.el Remove MozRepl stuff from js.el 2021-10-04 11:56:23 +02:00
ld-script.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
m4-mode.el
make-mode.el
meta-mode.el
mixal-mode.el
modula2.el
octave.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
opascal.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
pascal.el Use format-prompt for many more prompts 2021-10-05 03:44:56 +02:00
perl-mode.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
prog-mode.el Move context-menu selection items Defun/List/Symbol to prog-mode (bug#9054) 2021-10-03 20:35:49 +03:00
project.el Special-case the "Permission denied" messages 2021-10-15 15:12:29 +03:00
prolog.el Merge from origin/emacs-28 2021-10-05 07:50:22 -07:00
ps-mode.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
python.el Update Emacs requirement after removing compat code 2021-10-13 19:01:48 +02:00
ruby-mode.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
scheme.el
sh-script.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
simula.el
sql.el SQL mode supports sending passwords in process 2021-10-19 00:18:17 -04:00
subword.el
tcl.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
vera-mode.el
verilog-mode.el ; verilog-mode.el documentation and regexp cleanup from upstream. 2021-10-14 21:36:59 -04:00
vhdl-mode.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
which-func.el Don't use some obsolete names in documentation 2021-10-04 03:26:11 +02:00
xref.el xref.el: Better compatibility with outdated Emacs 28 builds 2021-10-20 01:04:17 +03:00
xscheme.el ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00