Function: LaTeX-fill-newline
LaTeX-fill-newline is a byte-compiled function defined in latex.el.
Signature
(LaTeX-fill-newline)
Documentation
Replace whitespace here with one newline and indent the line.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
;; The content of `LaTeX-fill-newline' was copied from the function
;; `fill-newline' in `fill.el' (CVS Emacs, January 2004) and adapted
;; to the needs of AUCTeX.
(defun LaTeX-fill-newline ()
"Replace whitespace here with one newline and indent the line."
(skip-chars-backward " \t")
(insert ?\n)
;; Give newline the properties of the space(s) it replaces
(set-text-properties (1- (point)) (point)
(text-properties-at (point)))
(and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?")
(or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|)
(match-end 2))
;; When refilling later on, this newline would normally not
;; be replaced by a space, so we need to mark it specially to
;; re-install the space when we unfill.
(put-text-property (1- (point)) (point) 'fill-space (match-string 1)))
;; If we don't want breaks in invisible text, don't insert
;; an invisible newline.
(if fill-nobreak-invisible
(remove-text-properties (1- (point)) (point)
'(invisible t)))
;; Insert the fill prefix.
(and fill-prefix (not (equal fill-prefix ""))
;; Markers that were after the whitespace are now at point: insert
;; before them so they don't get stuck before the prefix.
(insert-before-markers-and-inherit fill-prefix))
(indent-according-to-mode)
(run-hooks 'LaTeX-fill-newline-hook))