Function: LaTeX-verbatim-p

LaTeX-verbatim-p is a byte-compiled function defined in latex.el.

Signature

(LaTeX-verbatim-p &optional POS)

Documentation

Return non-nil if position POS is in a verbatim-like construct.

The macro body ("\\verb") and its delimiters, including optional argument if any, aren't considered as component of a verbatim-like construct.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun LaTeX-verbatim-p (&optional pos)
  "Return non-nil if position POS is in a verbatim-like construct.
The macro body (\"\\verb\") and its delimiters, including
optional argument if any, aren't considered as component of a
verbatim-like construct."
  (save-excursion
    (when pos (goto-char pos))
    (save-match-data
      ;; TODO: Factor out syntax propertize facility from font-latex.el
      ;; and re-implement as major mode feature.  Then we can drop the
      ;; fallback code below.
      (if (eq TeX-install-font-lock 'font-latex-setup)
          (progn
            (syntax-propertize (point))
            (nth 3 (syntax-ppss)))
        ;; Fallback for users who stay away from font-latex.
        (or
         (let ((region (LaTeX-verbatim-macro-boundaries t)))
           (and region
                (<= (car region) (point) (cdr region))))
         (member (LaTeX-current-environment) (LaTeX-verbatim-environments)))))))