Variable: c-report-syntactic-errors

c-report-syntactic-errors is a customizable variable defined in cc-vars.el.gz.

Value

nil

Documentation

If non-nil, certain syntactic errors are reported with a ding and a message, for example when an "else" is indented for which there's no corresponding "if".

Note however that CC Mode doesn't make any special effort to check for syntactic errors; that's the job of the compiler. The reason it can report cases like the one above is that it can't find the correct anchoring position to indent the line in that case.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-vars.el.gz
(defcustom c-report-syntactic-errors nil
  "If non-nil, certain syntactic errors are reported with a ding
and a message, for example when an \"else\" is indented for which
there's no corresponding \"if\".

Note however that CC Mode doesn't make any special effort to check for
syntactic errors; that's the job of the compiler.  The reason it can
report cases like the one above is that it can't find the correct
anchoring position to indent the line in that case."
  :type 'boolean
  :group 'c)