1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

CC Mode: Make it scroll fast over buffers with only #define's

* lisp/progmodes/cc-engine.el (c-forward-over-token): New LIMIT parameter

* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): Replace
ill-formed regular expression (which mixed \\sw and character alternative)
with simpler efficient regexp.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): New forward limit LIM+ used in
c-forward-declarator and c-forward-over-token.
This commit is contained in:
Alan Mackenzie 2022-11-24 10:51:03 +00:00
parent 005efce764
commit 3208a42c47
3 changed files with 11 additions and 9 deletions

View file

@ -1188,7 +1188,7 @@ definition, or nil if the language doesn't have any."
t (if (c-lang-const c-opt-cpp-macro-define)
(concat (c-lang-const c-anchored-cpp-prefix)
(c-lang-const c-opt-cpp-macro-define)
"[ \t]+\\(\\sw\\|_\\)+\\([^(a-zA-Z0-9_]\\|$\\)")))
"[ \t]+[a-zA-Z0-9_]+\\([^(a-zA-Z0-9_]\\|$\\)")))
(c-lang-defconst c-cpp-expr-directives
"List of cpp directives (without the prefix) that are followed by an