Function: cwarn-mode
cwarn-mode is an autoloaded, interactive and byte-compiled function
defined in cwarn.el.gz.
Signature
(cwarn-mode &optional ARG)
Documentation
Minor mode that highlights suspicious C and C++ constructions.
This is a minor mode. If called interactively, toggle the Cwarn
mode mode. If the prefix argument is positive, enable the mode, and
if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the
mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate cwarn-mode(var)/cwarn-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Suspicious constructs are highlighted using font-lock-warning-face.
Note, in addition to enabling this minor mode, the major mode must
be included in the variable cwarn-configuration. By default C and
C++ modes are included.
Probably introduced at or before Emacs version 21.1.
Key Bindings
Aliases
turn-on-cwarn-mode (obsolete since 24.1)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cwarn.el.gz
;;}}}
;;{{{ The modes
;;;###autoload
(define-minor-mode cwarn-mode
"Minor mode that highlights suspicious C and C++ constructions.
Suspicious constructs are highlighted using `font-lock-warning-face'.
Note, in addition to enabling this minor mode, the major mode must
be included in the variable `cwarn-configuration'. By default C and
C++ modes are included."
:group 'cwarn :lighter cwarn-mode-text
(cwarn-font-lock-keywords cwarn-mode)
(font-lock-flush))