1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 08:11:05 -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 Specify precedence in .authinfo files 2021-01-10 15:32:57 +01:00
autotype.texi Fix code for newline-and-indent in skeleton language. 2021-05-02 20:57:38 +02:00
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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cl.texi Merge from origin/emacs-28 2021-10-24 01:55:45 -07:00
dbus.texi Add command 'dbus-monitor' 2021-02-05 14:32:41 +01:00
dired-x.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
doclicense.texi
ebrowse.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ede.texi Prefer "website" to "homepage" 2021-09-16 15:42:44 +02:00
ediff.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
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 EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
emacs-gnutls.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
emacs-mime.texi Add a new command `mailcap-view-file' 2021-06-01 08:55:06 +02:00
epa.texi * doc/misc/epa.texi: Remove hand-written node pointers. 2021-05-13 08:21:10 -07:00
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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
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 Fix two Emacs version references in misc manuals 2021-02-11 19:21:48 +01:00
gnus-coding.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
idlwave.texi Revert "; Fix capitalization of F1..F12 keys in docs" 2021-09-25 22:50:09 +02:00
ido.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
info.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mairix-el.texi Fix mairix-el.texi menu 2021-10-10 13:58:57 +02:00
Makefile.in * doc/misc/Makefile.in (echo-sources): Make it not the first target. 2021-04-04 17:24:27 -07:00
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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
nxml-mode.texi Convert many more links to use HTTPS 2021-03-24 10:20:18 +01:00
octave-mode.texi Fix Octave double-quoted string line continuations 2021-02-11 14:35:47 +00:00
org-setup.org Fixes for doc/misc org source files 2021-02-26 19:48:34 -08:00
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 Fix two Emacs version references in misc manuals 2021-02-11 19:21:48 +01:00
sasl.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
sc.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
sem-user.texi ; Fix some typos in doc strings and manuals 2021-04-24 18:26:07 +02:00
semantic.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ses.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
sieve.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
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 Remove more hand-written node pointers in doc/misc 2021-05-13 09:08:40 -07:00
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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
vhdl-mode.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
vip.texi Update copyright year to 2021 2021-01-01 01:13:56 -08:00
viper.texi Revert "; Fix capitalization of F1..F12 keys in docs" 2021-09-25 22:50:09 +02:00
widget.texi Merge from origin/emacs-27 2021-01-04 07:50:26 -08:00
wisent.texi Avoid deprecation warnings with Texinfo 6.8 2021-07-04 14:55:42 +03:00
woman.texi * doc/misc/woman.texi (Introduction): Remove reference to old Emacs. 2021-04-02 16:33:15 +02:00