1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 08:31:09 -08:00
emacs/doc/misc
Alan Mackenzie 374f14fb99 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-type-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, c-inhibit-type-finder): New
variables.
(c-leave-cc-mode-mode): Nullify c-post-command-hook, c-post-gc-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/Install c-post-command, c-c-type-finder-pos,
c-type-finder-timer, and c-post-gc-hook.
(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-post-gc-hook): New hook to prevent CC Mode activity immediately following
GC, thus allowing keyboard/mouse input to be registered.
(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-24 19:59:18 +00:00
..
auth.texi
autotype.texi
bovine.texi Avoid deprecation warnings with Texinfo 6.8 2021-07-04 14:55:42 +03:00
calc.texi Fix example in calc manual 2021-10-18 15:56:58 +02:00
cc-mode.texi CC Mode: Fontify "found types" which are recognized after being first scanned 2021-10-24 19:59:18 +00:00
ChangeLog.1
cl.texi Merge from origin/emacs-28 2021-10-24 01:55:45 -07:00
dbus.texi
dired-x.texi
doclicense.texi
ebrowse.texi
ede.texi Prefer "website" to "homepage" 2021-09-16 15:42:44 +02:00
ediff.texi
edt.texi Revert "; Fix capitalization of F1..F12 keys in docs" 2021-09-25 22:50:09 +02:00
efaq-w32.texi Prefer "website" to "homepage" 2021-09-16 15:42:44 +02:00
efaq.texi Don't use some obsolete names in documentation 2021-10-04 03:26:11 +02:00
eieio.texi
emacs-gnutls.texi
emacs-mime.texi
epa.texi
erc.texi Release ERC 5.4.1 2021-10-15 16:51:59 -04:00
ert.texi Merge from origin/emacs-28 2021-10-09 07:50:36 -07:00
eshell.texi Be explicit about missing sections in eshell manual 2021-09-19 18:33:53 +02:00
eudc.texi
eww.texi Add new option to rename eww buffers 2021-10-15 14:13:58 +02:00
flymake.texi * doc/misc/flymake.texi: Fix @include docstyle.texi 2021-09-15 10:23:40 +01:00
forms.texi
gnus-coding.texi
gnus-faq.texi Prefer "website" to "homepage" 2021-09-16 15:42:44 +02:00
gnus.texi * doc/misc/gnus.texi (Loose Threads): Use regexp-opt in example. 2021-10-05 19:32:32 +02:00
gpl.texi
htmlfontify.texi
idlwave.texi Revert "; Fix capitalization of F1..F12 keys in docs" 2021-09-25 22:50:09 +02:00
ido.texi
info.texi
mairix-el.texi Fix mairix-el.texi menu 2021-10-10 13:58:57 +02:00
Makefile.in
message.texi Fix docs about the meaning of the Re: in the subject 2021-08-26 12:51:08 +02:00
mh-e.texi ; * doc/misc/mh-e.texi (Scan Line Formats): Fix typo, an extra "the". 2021-09-21 22:34:35 -07:00
modus-themes.org Update modus-themes to version 1.6.0 2021-09-29 12:55:46 +02:00
newsticker.texi
nxml-mode.texi
octave-mode.texi
org-setup.org
org.org Update to Org 9.5-59-g52e6f1 2021-10-23 13:46:59 -04:00
pcl-cvs.texi Avoid deprecation warnings with Texinfo 6.8 2021-07-04 14:55:42 +03:00
pgg.texi * doc/misc/pgg.texi: Clarify that its obsolete in the menu entry. 2021-09-16 02:33:08 +02:00
rcirc.texi Add rcirc-omit-unless-requested option 2021-09-30 16:25:48 +02:00
reftex.texi Don't use some obsolete names in documentation 2021-10-04 03:26:11 +02:00
remember.texi
sasl.texi
sc.texi
sem-user.texi
semantic.texi
ses.texi
sieve.texi
smtpmail.texi Add support for the oauth2.el library in nnimap and smtpmail 2021-08-05 12:33:21 +02:00
speedbar.texi Don't use some obsolete names in documentation 2021-10-04 03:26:11 +02:00
srecode.texi Avoid deprecation warnings with Texinfo 6.8 2021-07-04 14:55:42 +03:00
texinfo.tex Update from Gnulib 2021-10-04 15:21:31 -07:00
todo-mode.texi
tramp.texi Adapt Tramp manual 2021-10-18 19:53:34 +02:00
trampver.texi Change Tramp version to "2.5.2-pre" 2021-07-30 17:19:29 +02:00
url.texi
vhdl-mode.texi
vip.texi
viper.texi Revert "; Fix capitalization of F1..F12 keys in docs" 2021-09-25 22:50:09 +02:00
widget.texi
wisent.texi Avoid deprecation warnings with Texinfo 6.8 2021-07-04 14:55:42 +03:00
woman.texi