Function: LaTeX-mark-section

LaTeX-mark-section is an interactive and byte-compiled function defined in latex.el.

Signature

(LaTeX-mark-section &optional NO-SUBSECTIONS)

Documentation

Set mark at end of current logical section, and point at top.

If optional argument NO-SUBSECTIONS is non-nil, mark only the region from the current section start to the next sectioning command. Thereby subsections are not being marked.

If the function outline-mark-subtree is not available, LaTeX-mark-section always behaves like this regardless of the value of NO-SUBSECTIONS.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun LaTeX-mark-section (&optional no-subsections)
  "Set mark at end of current logical section, and point at top.
If optional argument NO-SUBSECTIONS is non-nil, mark only the
region from the current section start to the next sectioning
command.  Thereby subsections are not being marked.

If the function `outline-mark-subtree' is not available,
`LaTeX-mark-section' always behaves like this regardless of the
value of NO-SUBSECTIONS."
  (declare (modes LaTeX-mode))
  (interactive "P")
  (if (or no-subsections
          (not (fboundp 'outline-mark-subtree)))
      (progn
        (re-search-forward (concat  "\\(" (LaTeX-outline-regexp)
                                    "\\|\\'\\)"))
        (beginning-of-line)
        (push-mark (point) nil t)
        (re-search-backward (concat "\\(" (LaTeX-outline-regexp)
                                    "\\|\\`\\)")))
    (outline-mark-subtree)
    (when (and transient-mark-mode
               (not mark-active))
      (setq mark-active t)
      (run-hooks 'activate-mark-hook)))
  (TeX-activate-region))