Function: cwarn-font-lock-match-dangerous-semicolon
cwarn-font-lock-match-dangerous-semicolon is a byte-compiled function
defined in cwarn.el.gz.
Signature
(cwarn-font-lock-match-dangerous-semicolon LIMIT)
Documentation
Match semicolons directly after for, while, and if.
The semicolon after a do { ... } while (x); construction is not matched.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cwarn.el.gz
(defun cwarn-font-lock-match-dangerous-semicolon (limit)
"Match semicolons directly after `for', `while', and `if'.
The semicolon after a `do { ... } while (x);' construction is not matched."
(cwarn-font-lock-match
";"
(backward-sexp 2) ; Expression and keyword.
(or (looking-at "\\(for\\|if\\)\\>")
(and (looking-at "while\\>")
(condition-case nil
(progn
(backward-sexp 2) ; Body and "do".
(not (looking-at "do\\>")))
(error t))))))