Function: semantic-lex-unterminated-syntax-protection

semantic-lex-unterminated-syntax-protection is a macro defined in lex.el.gz.

Signature

(semantic-lex-unterminated-syntax-protection SYNTAX &rest FORMS)

Documentation

For SYNTAX, execute FORMS with protection for unterminated syntax.

If FORMS throws an error, treat this as a syntax problem, and execute the unterminated syntax code. FORMS should return a position. Regardless of an error, the cursor should be moved to the end of the desired syntax, and a position returned. If debug-on-error is set, errors are not caught, so that you can debug them. Avoid using a large FORMS since it is duplicated.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex.el.gz
(defmacro semantic-lex-unterminated-syntax-protection (syntax &rest forms)
  "For SYNTAX, execute FORMS with protection for unterminated syntax.
If FORMS throws an error, treat this as a syntax problem, and
execute the unterminated syntax code.  FORMS should return a position.
Regardless of an error, the cursor should be moved to the end of
the desired syntax, and a position returned.
If `debug-on-error' is set, errors are not caught, so that you can
debug them.
Avoid using a large FORMS since it is duplicated."
  (declare (indent 1) (debug t))
  `(if (and debug-on-error semantic-lex-debug-analyzers)
       (progn ,@forms)
     (condition-case nil
         (progn ,@forms)
       (error
        (semantic-lex-unterminated-syntax-detected ,syntax)))))