Function: tex-handle-newline

tex-handle-newline is an interactive and byte-compiled function defined in tex-mode.el.gz.

Signature

(tex-handle-newline INHIBIT-VALIDATION)

Documentation

Break a TeX paragraph with two newlines, or continue a comment.

If not in a comment, insert two newlines, breaking a paragraph for TeX, and check for mismatched braces or $s in the paragraph being terminated unless prefix arg INHIBIT-VALIDATION is non-nil to inhibit the checking. Otherwise (in a comment), just insert a single continued comment line.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun tex-handle-newline (inhibit-validation)
  "Break a TeX paragraph with two newlines, or continue a comment.
If not in a comment, insert two newlines, breaking a paragraph for TeX,
and check for mismatched braces or $s in the paragraph being terminated
unless prefix arg INHIBIT-VALIDATION is non-nil to inhibit the checking.
Otherwise (in a comment), just insert a single continued comment line."
  (interactive "*P")
  (if (nth 4 (syntax-ppss)) ; non-nil if point is in a TeX comment
      (comment-indent-new-line)
    (tex-terminate-paragraph inhibit-validation)))