Function: TeX-ispell-tex-arg-end
TeX-ispell-tex-arg-end is a byte-compiled function defined in tex.el.
Signature
(TeX-ispell-tex-arg-end &optional ARG1 ARG2 ARG3)
Documentation
Skip across ARG1, ARG2 and ARG3 number of braces and brackets.
This function is a variation of ispell-tex-arg-end. It should
be used when adding skip regions to ispell-tex-skip-alists for
constructs like:
\begin{tabularx}{300pt}[t]{lrc} ...
or
\fontspec{font name}[font features]
where optional and/or mandatory argument(s) follow(s) a mandatory one. ARG1 is the number of mandatory arguments before the optional one, ARG2 the max. number of following optional arguments, ARG3 is the max. number of mandatory arguments following. Omitting argument means 1.
Here some examples for additions to ispell-tex-skip-alists:
\begin{tabularx}{300pt}[t]{lrc} ...
ARG 1 2 3
("tabularx" TeX-ispell-tex-arg-end) or equivalent
("tabularx" TeX-ispell-tex-arg-end 1 1 1)
\fontspec{font name}[font features]
ARG1 ARG2 ARG3=0
("\\\\\\\\fontspec" TeX-ispell-tex-arg-end 1 1 0)
\raisebox{lift}[height][depth]{contents}
ARG1 ARG2 ARG3=0 (checked by Ispell)
("\\\\\\\\raisebox" TeX-ispell-tex-arg-end 1 2 0)
Optional arguments before the first mandatory one are all skipped.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-ispell-tex-arg-end (&optional arg1 arg2 arg3)
"Skip across ARG1, ARG2 and ARG3 number of braces and brackets.
This function is a variation of `ispell-tex-arg-end'. It should
be used when adding skip regions to `ispell-tex-skip-alists' for
constructs like:
\\begin{tabularx}{300pt}[t]{lrc} ...
or
\\fontspec{font name}[font features]
where optional and/or mandatory argument(s) follow(s) a mandatory
one. ARG1 is the number of mandatory arguments before the
optional one, ARG2 the max. number of following optional
arguments, ARG3 is the max. number of mandatory arguments
following. Omitting argument means 1.
Here some examples for additions to `ispell-tex-skip-alists':
\\begin{tabularx}{300pt}[t]{lrc} ...
ARG 1 2 3
(\"tabularx\" TeX-ispell-tex-arg-end) or equivalent
(\"tabularx\" TeX-ispell-tex-arg-end 1 1 1)
\\fontspec{font name}[font features]
ARG1 ARG2 ARG3=0
(\"\\\\\\\\fontspec\" TeX-ispell-tex-arg-end 1 1 0)
\\raisebox{lift}[height][depth]{contents}
ARG1 ARG2 ARG3=0 (checked by Ispell)
(\"\\\\\\\\raisebox\" TeX-ispell-tex-arg-end 1 2 0)
Optional arguments before the first mandatory one are all
skipped."
(condition-case nil
(progn
(while (looking-at "[ \t\n]*\\[") (forward-sexp))
(forward-sexp (or arg1 1))
(let ((num 0))
(while (and (looking-at "[ \t\n]*\\[")
(< num (or arg2 1)))
(setq num (1+ num))
(forward-sexp)))
(forward-sexp (or arg3 1)))
(error
(message "Error skipping s-expressions at point %d" (point))
(sit-for 2))))