Function: latex-forward-sexp
latex-forward-sexp is an interactive and byte-compiled function
defined in tex-mode.el.gz.
Signature
(latex-forward-sexp &optional ARG)
Documentation
Like forward-sexp but aware of multi-char elements and escaped parens.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun latex-forward-sexp (&optional arg)
"Like `forward-sexp' but aware of multi-char elements and escaped parens."
(interactive "P")
(unless arg (setq arg 1))
(let ((pos (point))
(opoint 0))
(condition-case err
(while (and (/= (point) opoint)
(/= arg 0))
(setq opoint (point))
(setq arg
(if (> arg 0)
(progn (latex-forward-sexp-1) (1- arg))
(progn (latex-backward-sexp-1) (1+ arg)))))
(scan-error
(goto-char pos)
(signal (car err) (cdr err))))))