Commit 0d5caa9a authored by Alan Mackenzie's avatar Alan Mackenzie

Optimize for typing characters into long C++ raw strings.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
(c-font-lock-objc-methods) (c-font-lock-declarations, c-font-lock-enum-tail)
(c-font-lock-cut-off-declarators, c-font-lock-enclosing-decls): If the chunk
been fontified consists entirely of comments and strings, don't attempt to
perform the function's action.

* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't
expand (c-new-BEG c-new-END) unnecessarily to the entire raw string being
fontified.
(c-fl-decl-start, c-fl-decl-end): When in a (raw or otherwise) string, don't
return a position outside of the string (which used to cause unneeded
fontification).
parent 085929ca
Pipeline #1419 passed with stage
in 52 minutes
......@@ -880,48 +880,51 @@ casts and declarations are fontified. Used on level 2 and higher."
(when (bobp)
(c-clear-found-types))
;; Clear the c-type char properties which mark the region, to recalculate
;; them properly. The most interesting properties are those put on the
;; closest token before the region.
(save-excursion
(let ((pos (point)))
(c-backward-syntactic-ws)
(c-clear-char-properties
(if (and (not (bobp))
(memq (c-get-char-property (1- (point)) 'c-type)
'(c-decl-arg-start
c-decl-end
c-decl-id-start
c-decl-type-start)))
(1- (point))
pos)
limit 'c-type)))
;; Update `c-state-cache' to the beginning of the region. This will
;; make `c-beginning-of-syntax' go faster when it's used later on,
;; and it's near the point most of the time.
(c-parse-state)
;; Check if the fontified region starts inside a declarator list so
;; that `c-font-lock-declarators' should be called at the start.
;; The declared identifiers are font-locked correctly as types, if
;; that is what they are.
(let ((prop (save-excursion
(c-backward-syntactic-ws)
(unless (bobp)
(c-get-char-property (1- (point)) 'c-type)))))
(when (memq prop '(c-decl-id-start c-decl-type-start))
(c-forward-syntactic-ws limit)
(c-font-lock-declarators limit t (eq prop 'c-decl-type-start)
(not (c-bs-at-toplevel-p (point))))))
(setq c-font-lock-context ;; (c-guess-font-lock-context)
(save-excursion
(if (and c-cpp-expr-intro-re
(c-beginning-of-macro)
(looking-at c-cpp-expr-intro-re))
'in-cpp-expr)))
nil)
(c-skip-comments-and-strings limit)
(when (< (point) limit)
;; Clear the c-type char properties which mark the region, to recalculate
;; them properly. The most interesting properties are those put on the
;; closest token before the region.
(save-excursion
(let ((pos (point)))
(c-backward-syntactic-ws)
(c-clear-char-properties
(if (and (not (bobp))
(memq (c-get-char-property (1- (point)) 'c-type)
'(c-decl-arg-start
c-decl-end
c-decl-id-start
c-decl-type-start)))
(1- (point))
pos)
limit 'c-type)))
;; Update `c-state-cache' to the beginning of the region. This will
;; make `c-beginning-of-syntax' go faster when it's used later on,
;; and it's near the point most of the time.
(c-parse-state)
;; Check if the fontified region starts inside a declarator list so
;; that `c-font-lock-declarators' should be called at the start.
;; The declared identifiers are font-locked correctly as types, if
;; that is what they are.
(let ((prop (save-excursion
(c-backward-syntactic-ws)
(unless (bobp)
(c-get-char-property (1- (point)) 'c-type)))))
(when (memq prop '(c-decl-id-start c-decl-type-start))
(c-forward-syntactic-ws limit)
(c-font-lock-declarators limit t (eq prop 'c-decl-type-start)
(not (c-bs-at-toplevel-p (point))))))
(setq c-font-lock-context ;; (c-guess-font-lock-context)
(save-excursion
(if (and c-cpp-expr-intro-re
(c-beginning-of-macro)
(looking-at c-cpp-expr-intro-re))
'in-cpp-expr)))
nil))
(defun c-font-lock-<>-arglists (limit)
;; This function will be called from font-lock for a region bounded by POINT
......@@ -936,73 +939,76 @@ casts and declarations are fontified. Used on level 2 and higher."
;;
;; This function might do hidden buffer changes.
(let (;; The font-lock package in Emacs is known to clobber
;; `parse-sexp-lookup-properties' (when it exists).
(parse-sexp-lookup-properties
(cc-eval-when-compile
(boundp 'parse-sexp-lookup-properties)))
(c-parse-and-markup-<>-arglists t)
c-restricted-<>-arglists
id-start id-end id-face pos kwd-sym)
(c-skip-comments-and-strings limit)
(when (< (point) limit)
(while (and (< (point) limit)
(re-search-forward c-opt-<>-arglist-start limit t))
(let (;; The font-lock package in Emacs is known to clobber
;; `parse-sexp-lookup-properties' (when it exists).
(parse-sexp-lookup-properties
(cc-eval-when-compile
(boundp 'parse-sexp-lookup-properties)))
(c-parse-and-markup-<>-arglists t)
c-restricted-<>-arglists
id-start id-end id-face pos kwd-sym)
(setq id-start (match-beginning 1)
id-end (match-end 1)
pos (point))
(while (and (< (point) limit)
(re-search-forward c-opt-<>-arglist-start limit t))
(goto-char id-start)
(unless (c-skip-comments-and-strings limit)
(setq kwd-sym nil
c-restricted-<>-arglists nil
id-face (get-text-property id-start 'face))
(if (cond
((eq id-face 'font-lock-type-face)
;; The identifier got the type face so it has already been
;; handled in `c-font-lock-declarations'.
nil)
((eq id-face 'font-lock-keyword-face)
(when (looking-at c-opt-<>-sexp-key)
;; There's a special keyword before the "<" that tells
;; that it's an angle bracket arglist.
(setq kwd-sym (c-keyword-sym (match-string 1)))))
(t
;; There's a normal identifier before the "<". If we're not in
;; a declaration context then we set `c-restricted-<>-arglists'
;; to avoid recognizing templates in function calls like "foo (a
;; < b, c > d)".
(c-backward-syntactic-ws)
(when (and (memq (char-before) '(?\( ?,))
(not (eq (get-text-property (1- (point)) 'c-type)
'c-decl-arg-start)))
(setq c-restricted-<>-arglists t))
t))
(setq id-start (match-beginning 1)
id-end (match-end 1)
pos (point))
(progn
(goto-char (1- pos))
;; Check for comment/string both at the identifier and
;; at the "<".
(unless (c-skip-comments-and-strings limit)
(c-fontify-types-and-refs ()
(when (c-forward-<>-arglist (c-keyword-member
kwd-sym 'c-<>-type-kwds))
(when (and c-opt-identifier-concat-key
(not (get-text-property id-start 'face)))
(c-forward-syntactic-ws)
(cond ((looking-at c-opt-identifier-concat-key)
(c-put-font-lock-face id-start id-end
c-reference-face-name))
((eq (char-after) ?\())
(t (c-put-font-lock-face id-start id-end
'font-lock-type-face))))))
(goto-char pos)))
(goto-char pos)))))
(goto-char id-start)
(unless (c-skip-comments-and-strings limit)
(setq kwd-sym nil
c-restricted-<>-arglists nil
id-face (get-text-property id-start 'face))
(if (cond
((eq id-face 'font-lock-type-face)
;; The identifier got the type face so it has already been
;; handled in `c-font-lock-declarations'.
nil)
((eq id-face 'font-lock-keyword-face)
(when (looking-at c-opt-<>-sexp-key)
;; There's a special keyword before the "<" that tells
;; that it's an angle bracket arglist.
(setq kwd-sym (c-keyword-sym (match-string 1)))))
(t
;; There's a normal identifier before the "<". If we're not in
;; a declaration context then we set `c-restricted-<>-arglists'
;; to avoid recognizing templates in function calls like "foo (a
;; < b, c > d)".
(c-backward-syntactic-ws)
(when (and (memq (char-before) '(?\( ?,))
(not (eq (get-text-property (1- (point)) 'c-type)
'c-decl-arg-start)))
(setq c-restricted-<>-arglists t))
t))
(progn
(goto-char (1- pos))
;; Check for comment/string both at the identifier and
;; at the "<".
(unless (c-skip-comments-and-strings limit)
(c-fontify-types-and-refs ()
(when (c-forward-<>-arglist (c-keyword-member
kwd-sym 'c-<>-type-kwds))
(when (and c-opt-identifier-concat-key
(not (get-text-property id-start 'face)))
(c-forward-syntactic-ws)
(cond ((looking-at c-opt-identifier-concat-key)
(c-put-font-lock-face id-start id-end
c-reference-face-name))
((eq (char-after) ?\())
(t (c-put-font-lock-face id-start id-end
'font-lock-type-face))))))
(goto-char pos)))
(goto-char pos))))))
nil)
(defun c-font-lock-declarators (limit list types not-top
......@@ -1311,227 +1317,229 @@ casts and declarations are fontified. Used on level 2 and higher."
;; This function might do hidden buffer changes.
;;(message "c-font-lock-declarations search from %s to %s" (point) limit)
(c-skip-comments-and-strings limit)
(when (< (point) limit)
(save-restriction
(let (;; The position where `c-find-decl-spots' last stopped.
start-pos
;; o - 'decl if we're in an arglist containing declarations
;; (but if `c-recognize-paren-inits' is set it might also be
;; an initializer arglist);
;; o - '<> if the arglist is of angle bracket type;
;; o - 'arglist if it's some other arglist;
;; o - nil, if not in an arglist at all. This includes the
;; parenthesized condition which follows "if", "while", etc.
context
;; A list of starting positions of possible type declarations, or of
;; the typedef preceding one, if any.
last-cast-end
;; The result from `c-forward-decl-or-cast-1'.
decl-or-cast
;; The maximum of the end positions of all the checked type
;; decl expressions in the successfully identified
;; declarations. The position might be either before or
;; after the syntactic whitespace following the last token
;; in the type decl expression.
(max-type-decl-end 0)
;; Same as `max-type-decl-*', but used when we're before
;; `token-pos'.
(max-type-decl-end-before-token 0)
;; End of <..> construct which has had c-<>-arg-sep c-type
;; properties set within it.
(max-<>-end 0)
;; Set according to the context to direct the heuristics for
;; recognizing C++ templates.
c-restricted-<>-arglists
;; Turn on recording of identifier ranges in
;; `c-forward-decl-or-cast-1' and `c-forward-label' for
;; later fontification.
(c-record-type-identifiers t)
label-type
c-record-ref-identifiers
;; Make `c-forward-type' calls mark up template arglists if
;; it finds any. That's necessary so that we later will
;; stop inside them to fontify types there.
(c-parse-and-markup-<>-arglists t)
;; The font-lock package in Emacs is known to clobber
;; `parse-sexp-lookup-properties' (when it exists).
(parse-sexp-lookup-properties
(cc-eval-when-compile
(boundp 'parse-sexp-lookup-properties))
))
;; Below we fontify a whole declaration even when it crosses the limit,
;; to avoid gaps when jit/lazy-lock fontifies the file a block at a
;; time. That is however annoying during editing, e.g. the following is
;; a common situation while the first line is being written:
;;
;; my_variable
;; some_other_variable = 0;
;;
;; font-lock will put the limit at the beginning of the second line
;; here, and if we go past it we'll fontify "my_variable" as a type and
;; "some_other_variable" as an identifier, and the latter will not
;; correct itself until the second line is changed. To avoid that we
;; narrow to the limit if the region to fontify is a single line.
(if (<= limit (c-point 'bonl))
(narrow-to-region
(point-min)
(save-excursion
;; Narrow after any operator chars following the limit though,
;; since those characters can be useful in recognizing a
;; declaration (in particular the '{' that opens a function body
;; after the header).
(goto-char limit)
(skip-chars-forward c-nonsymbol-chars)
(point))))
(c-find-decl-spots
limit
c-decl-start-re
(eval c-maybe-decl-faces)
(lambda (match-pos inside-macro &optional toplev)
;; Note to maintainers: don't use `limit' inside this lambda form;
;; c-find-decl-spots sometimes narrows to less than `limit'.
(setq start-pos (point))
(when
;; The result of the form below is true when we don't recognize a
;; declaration or cast, and we don't recognize a "non-decl",
;; typically a brace list.
(if (or (and (eq (get-text-property (point) 'face)
'font-lock-keyword-face)
(looking-at c-not-decl-init-keywords))
(and c-macro-with-semi-re
(looking-at c-macro-with-semi-re))) ; 2008-11-04
;; Don't do anything more if we're looking at a keyword that
;; can't start a declaration.
t
;; Set `context' and `c-restricted-<>-arglists'. Look for
;; "<" for the sake of C++-style template arglists.
;; Ignore "(" when it's part of a control flow construct
;; (e.g. "for (").
(let ((got-context
(c-get-fontification-context
match-pos
(< match-pos (if inside-macro
max-type-decl-end-before-token
max-type-decl-end))
toplev)))
(setq context (car got-context)
c-restricted-<>-arglists (cdr got-context)))
;; Check we haven't missed a preceding "typedef".
(when (not (looking-at c-typedef-key))
(c-backward-syntactic-ws)
(c-backward-token-2)
(or (looking-at c-typedef-key)
(goto-char start-pos)))
;; In QT, "more" is an irritating keyword that expands to nothing.
;; We skip over it to prevent recognition of "more slots: <symbol>"
;; as a bitfield declaration.
(when (and (c-major-mode-is 'c++-mode)
(looking-at
(concat "\\(more\\)\\([^" c-symbol-chars "]\\|$\\)")))
(goto-char (match-end 1))
(c-forward-syntactic-ws))
(save-restriction
(let (;; The position where `c-find-decl-spots' last stopped.
start-pos
;; o - 'decl if we're in an arglist containing declarations
;; (but if `c-recognize-paren-inits' is set it might also be
;; an initializer arglist);
;; o - '<> if the arglist is of angle bracket type;
;; o - 'arglist if it's some other arglist;
;; o - nil, if not in an arglist at all. This includes the
;; parenthesized condition which follows "if", "while", etc.
context
;; A list of starting positions of possible type declarations, or of
;; the typedef preceding one, if any.
last-cast-end
;; The result from `c-forward-decl-or-cast-1'.
decl-or-cast
;; The maximum of the end positions of all the checked type
;; decl expressions in the successfully identified
;; declarations. The position might be either before or
;; after the syntactic whitespace following the last token
;; in the type decl expression.
(max-type-decl-end 0)
;; Same as `max-type-decl-*', but used when we're before
;; `token-pos'.
(max-type-decl-end-before-token 0)
;; End of <..> construct which has had c-<>-arg-sep c-type
;; properties set within it.
(max-<>-end 0)
;; Set according to the context to direct the heuristics for
;; recognizing C++ templates.
c-restricted-<>-arglists
;; Turn on recording of identifier ranges in
;; `c-forward-decl-or-cast-1' and `c-forward-label' for
;; later fontification.
(c-record-type-identifiers t)
label-type
c-record-ref-identifiers
;; Make `c-forward-type' calls mark up template arglists if
;; it finds any. That's necessary so that we later will
;; stop inside them to fontify types there.
(c-parse-and-markup-<>-arglists t)
;; The font-lock package in Emacs is known to clobber
;; `parse-sexp-lookup-properties' (when it exists).
(parse-sexp-lookup-properties
(cc-eval-when-compile
(boundp 'parse-sexp-lookup-properties))
))
;; Below we fontify a whole declaration even when it crosses the limit,
;; to avoid gaps when jit/lazy-lock fontifies the file a block at a
;; time. That is however annoying during editing, e.g. the following is
;; a common situation while the first line is being written:
;;
;; my_variable
;; some_other_variable = 0;
;;
;; font-lock will put the limit at the beginning of the second line
;; here, and if we go past it we'll fontify "my_variable" as a type and
;; "some_other_variable" as an identifier, and the latter will not
;; correct itself until the second line is changed. To avoid that we
;; narrow to the limit if the region to fontify is a single line.
(if (<= limit (c-point 'bonl))
(narrow-to-region
(point-min)
(save-excursion
;; Narrow after any operator chars following the limit though,
;; since those characters can be useful in recognizing a
;; declaration (in particular the '{' that opens a function body
;; after the header).
(goto-char limit)
(skip-chars-forward c-nonsymbol-chars)
(point))))
(c-find-decl-spots
limit
c-decl-start-re
(eval c-maybe-decl-faces)
(lambda (match-pos inside-macro &optional toplev)
;; Note to maintainers: don't use `limit' inside this lambda form;
;; c-find-decl-spots sometimes narrows to less than `limit'.
(setq start-pos (point))
(when
;; The result of the form below is true when we don't recognize a
;; declaration or cast, and we don't recognize a "non-decl",
;; typically a brace list.
(if (or (and (eq (get-text-property (point) 'face)
'font-lock-keyword-face)
(looking-at c-not-decl-init-keywords))
(and c-macro-with-semi-re
(looking-at c-macro-with-semi-re))) ; 2008-11-04
;; Don't do anything more if we're looking at a keyword that
;; can't start a declaration.
t
;; Set `context' and `c-restricted-<>-arglists'. Look for
;; "<" for the sake of C++-style template arglists.
;; Ignore "(" when it's part of a control flow construct
;; (e.g. "for (").
(let ((got-context
(c-get-fontification-context
match-pos
(< match-pos (if inside-macro
max-type-decl-end-before-token
max-type-decl-end))
toplev)))
(setq context (car got-context)
c-restricted-<>-arglists (cdr got-context)))
;; Check we haven't missed a preceding "typedef".
(when (not (looking-at c-typedef-key))
(c-backward-syntactic-ws)
(c-backward-token-2)
(or (looking-at c-typedef-key)
(goto-char start-pos)))
;; In QT, "more" is an irritating keyword that expands to nothing.
;; We skip over it to prevent recognition of "more slots: <symbol>"
;; as a bitfield declaration.
(when (and (c-major-mode-is 'c++-mode)
(looking-at
(concat "\\(more\\)\\([^" c-symbol-chars "]\\|$\\)")))
(goto-char (match-end 1))
(c-forward-syntactic-ws))
;; Now analyze the construct.
(if (eq context 'not-decl)
(progn
(setq decl-or-cast nil)
(if (c-syntactic-re-search-forward
"," (min limit (point-max)) 'at-limit t)
(c-put-char-property (1- (point)) 'c-type 'c-not-decl))
nil)
(setq decl-or-cast
(c-forward-decl-or-cast-1
match-pos context last-cast-end))
;; Ensure that c-<>-arg-sep c-type properties are in place on the
;; commas separating the arguments inside template/generic <..>s.
(when (and (eq (char-before match-pos) ?<)
(> match-pos max-<>-end))
(save-excursion
(goto-char match-pos)
(c-backward-token-2)
(if (and
(eq (char-after) ?<)
(let ((c-restricted-<>-arglists
(save-excursion
(c-backward-token-2)
(and
(not (looking-at c-opt-<>-sexp-key))
(progn (c-backward-syntactic-ws)
(memq (char-before) '(?\( ?,)))
(not (eq (c-get-char-property (1- (point))
'c-type)
'c-decl-arg-start))))))
(c-forward-<>-arglist nil)))
(setq max-<>-end (point)))))
(cond
((eq decl-or-cast 'cast)
;; Save the position after the previous cast so we can feed
;; it to `c-forward-decl-or-cast-1' in the next round. That
;; helps it discover cast chains like "(a) (b) c".
(setq last-cast-end (point))
(c-fontify-recorded-types-and-refs)
nil)
(decl-or-cast
;; We've found a declaration.
;; Set `max-type-decl-end' or `max-type-decl-end-before-token'
;; under the assumption that we're after the first type decl
;; expression in the declaration now. That's not really true;
;; we could also be after a parenthesized initializer
;; expression in C++, but this is only used as a last resort
;; to slant ambiguous expression/declarations, and overall
;; it's worth the risk to occasionally fontify an expression
;; as a declaration in an initializer expression compared to
;; getting ambiguous things in normal function prototypes
;; fontified as expressions.
(if inside-macro
(when (> (point) max-type-decl-end-before-token)
(setq max-type-decl-end-before-token (point)))
(when (> (point) max-type-decl-end)
(setq max-type-decl-end (point))))
(goto-char start-pos)
(c-font-lock-single-decl limit decl-or-cast match-pos
context
(or toplev (nth 4 decl-or-cast))))
(t t))))
;; It was a false alarm. Check if we're in a label (or other
;; construct with `:' except bitfield) instead.
(goto-char start-pos)
(when (setq label-type (c-forward-label t match-pos nil))
;; Can't use `c-fontify-types-and-refs' here since we
;; use the label face at times.
(cond ((eq label-type 'goto-target)
(c-put-font-lock-face (caar c-record-ref-identifiers)
(cdar c-record-ref-identifiers)
c-label-face-name))
((eq label-type 'qt-1kwd-colon)
(c-put-font-lock-face (caar c-record-ref-identifiers)
(cdar c-record-ref-identifiers)
'font-lock-keyword-face))
((eq label-type 'qt-2kwds-colon)
(mapc
(lambda (kwd)
(c-put-font-lock-face (car kwd) (cdr kwd)
;; Now analyze the construct.
(if (eq context 'not-decl)
(progn
(setq decl-or-cast nil)
(if (c-syntactic-re-search-forward
"," (min limit (point-max)) 'at-limit t)
(c-put-char-property (1- (point)) 'c-type 'c-not-decl))
nil)
(setq decl-or-cast
(c-forward-decl-or-cast-1
match-pos context last-cast-end))
;; Ensure that c-<>-arg-sep c-type properties are in place on the
;; commas separating the arguments inside template/generic <..>s.
(when (and (eq (char-before match-pos) ?<)
(> match-pos max-<>-end))
(save-excursion
(goto-char match-pos)
(c-backward-token-2)
(if (and
(eq (char-after) ?<)
(let ((c-restricted-<>-arglists
(save-excursion
(c-backward-token-2)
(and
(not (looking-at c-opt-<>-sexp-key))
(progn (c-backward-syntactic-ws)
(memq (char-before) '(?\( ?,)))
(not (eq (c-get-char-property (1- (point))
'c-type)
'c-decl-arg-start))))))
(c-forward-<>-arglist nil)))
(setq max-<>-end (point)))))
(cond
((eq decl-or-cast 'cast)
;; Save the position after the previous cast so we can feed
;; it to `c-forward-decl-or-cast-1' in the next round. That
;; helps it discover cast chains like "(a) (b) c".
(setq last-cast-end (point))
(c-fontify-recorded-types-and-refs)
nil)
(decl-or-cast
;; We've found a declaration.
;; Set `max-type-decl-end' or `max-type-decl-end-before-token'
;; under the assumption that we're after the first type decl
;; expression in the declaration now. That's not really true;
;; we could also be after a parenthesized initializer
;; expression in C++, but this is only used as a last resort
;; to slant ambiguous expression/declarations, and overall
;; it's worth the risk to occasionally fontify an expression
;; as a declaration in an initializer expression compared to
;; getting ambiguous things in normal function prototypes
;; fontified as expressions.
(if inside-macro
(when (> (point) max-type-decl-end-before-token)
(setq max-type-decl-end-before-token (point)))
(when (> (point) max-type-decl-end)
(setq max-type-decl-end (point))))
(goto-char start-pos)
(c-font-lock-single-decl limit decl-or-cast match-pos
context
(or toplev (nth 4 decl-or-cast))))
(t t))))
;; It was a false alarm. Check if we're in a label (or other
;; construct with `:' except bitfield) instead.
(goto-char start-pos)
(when (setq label-type (c-forward-label t match-pos nil))
;; Can't use `c-fontify-types-and-refs' here since we
;; use the label face at times.
(cond ((eq label-type 'goto-target)
(c-put-font-lock-face (caar c-record-ref-identifiers)
(cdar c-record-ref-identifiers)
c-label-face-name))
((eq label-type 'qt-1kwd-colon)
(c-put-font-lock-face (caar c-record-ref-identifiers)
(cdar c-record-ref-identifiers)
'font-lock-keyword-face))
c-record-ref-identifiers)))
(setq c-record-ref-identifiers nil)
;; `c-forward-label' has probably added a `c-decl-end'
;; marker, so return t to `c-find-decl-spots' to signal
;; that.
t))))
nil)))
((eq label-type 'qt-2kwds-colon)
(mapc
(lambda (kwd)
(c-put-font-lock-face (car kwd) (cdr kwd)
'font-lock-keyword-face))
c-record-ref-identifiers)))
(setq c-record-ref-identifiers nil)
;; `c-forward-label' has probably added a `c-decl-end'
;; marker, so return t to `c-find-decl-spots' to signal
;; that.
t))))
nil))))
(defun c-font-lock-enum-body (limit)
;; Fontify the identifiers of each enum we find by searching forward.
......@@ -1561,19 +1569,21 @@ casts and declarations are fontified. Used on level 2 and higher."