Function: org-capture-empty-lines-after

org-capture-empty-lines-after is a byte-compiled function defined in org-capture.el.gz.

Signature

(org-capture-empty-lines-after &optional N)

Documentation

Set the correct number of empty lines after the inserted string.

Point will remain at the first line after the inserted text. If N is nil, :empty-lines-after or :empty-lines are considered.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-capture.el.gz
(defun org-capture-empty-lines-after (&optional n)
  "Set the correct number of empty lines after the inserted string.
Point will remain at the first line after the inserted text.
If N is nil, :empty-lines-after or :empty-lines are considered."
  (setq n (or n (org-capture-get :empty-lines-after)
	      (org-capture-get :empty-lines) 0))
  (org-back-over-empty-lines)
  (while (looking-at "[ \t]*\n") (replace-match ""))
  (let ((pos (point)))
    (when (> n 0) (newline n))
    (goto-char pos)))