Function: LaTeX-narrow-to-environment

LaTeX-narrow-to-environment is an interactive and byte-compiled function defined in latex.el.

Signature

(LaTeX-narrow-to-environment &optional COUNT)

Documentation

Make text outside current environment invisible.

With optional COUNT keep visible that number of enclosing environments.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
;;; Narrowing

(defun LaTeX-narrow-to-environment (&optional count)
  "Make text outside current environment invisible.
With optional COUNT keep visible that number of enclosing
environments."
  (declare (modes LaTeX-mode))
  (interactive "p")
  (setq count (if count (abs count) 1))
  (save-excursion
    (widen)
    (let ((opoint (point))
          beg end)
      (dotimes (_ count) (LaTeX-find-matching-end))
      (setq end (point))
      (goto-char opoint)
      (dotimes (_ count) (LaTeX-find-matching-begin))
      (setq beg (point))
      (narrow-to-region beg end))))