[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 73ccc38 22/95: Simplify addition of entirely ski
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 73ccc38 22/95: Simplify addition of entirely skipped environments |
Date: |
Sun, 16 Apr 2017 01:26:48 -0400 (EDT) |
branch: externals/auctex
commit 73ccc383e8ce2f5447b34b64524d28b89de9c1fe
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Simplify addition of entirely skipped environments
* tex-ispell.el (TeX-ispell-skip-envs-list): New variable for
environments which should be skipped entirely.
(TeX-ispell-skip-envs-regexp): New variable keeping the regexp
generated from `TeX-ispell-skip-envs-list'.
---
tex-ispell.el | 73 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 52 insertions(+), 21 deletions(-)
diff --git a/tex-ispell.el b/tex-ispell.el
index 9e3752d..2065e39 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -220,6 +220,48 @@ argument and spell check the mandatory one."))
"List of LaTeX environments with an opt argument to be skipped."))
+;; Add new environments which should be skipped entirely here:
+(eval-when-compile
+ (defvar TeX-ispell-skip-envs-list
+ '(;; amsmath.sty
+ "align"
+ "align*"
+ "alignat"
+ "alignat*"
+ "flalign"
+ "flalign*"
+ "gather"
+ "gather*"
+ "multline"
+ "multline*"
+ ;; breqn.sty
+ "darray"
+ "darray*"
+ "dgroup"
+ "dgroup*"
+ "dmath"
+ "dmath*"
+ "dseries"
+ "dseries*"
+ ;; fancyvrb.sty
+ "BVerbatim"
+ "BVerbatim*"
+ "LVerbatim"
+ "LVerbatim*"
+ "SaveVerbatim"
+ "Verbatim"
+ "Verbatim*"
+ "VerbatimOut"
+ ;; listings.sty
+ "lstlisting"
+ ;; minted.sty
+ "minted"
+ ;; tikz.sty
+ "tikzpicture")
+ "List of LaTeX environments which will be skipped entirely.
+Environments for math or verbatim text are candidates for this list."))
+
+
;; Add others delimited here:
(TeX-ispell-skip-setcar
'(;; LaTeX-base
@@ -238,28 +280,10 @@ argument and spell check the mandatory one."))
;; Add environments here:
(TeX-ispell-skip-setcdr
- '(;; amsmath.sty
- ("\\(align\\(\\*\\|at\\*?\\)?\\|flalign\\*?\\)" .
- "\\\\end{\\(align\\(\\*\\|at\\*?\\)?\\|flalign\\*?\\)}")
- ("gather\\*?" . "\\\\end{gather\\*?}")
- ("multline\\*?" . "\\\\end{multline\\*?}")
- ;; breqn.sty
- ("\\(d\\(array\\*?\\|group\\*?\\|math\\*?\\|series\\*?\\)\\)" .
- "\\\\end{\\(d\\(array\\*?\\|group\\*?\\|math\\*?\\|series\\*?\\)\\)}")
- ;; listings.sty
- ("lstlisting" . "\\\\end{lstlisting}")
- ;; minted.sty
- ("minted" . "\\\\end{minted}")
- ;; tabularx.sty, tabulary.sty, Standard LaTeX tabular*-env
+ '(;; tabularx.sty, tabulary.sty, Standard LaTeX tabular*-env
("tabular[*xy]" TeX-ispell-tex-arg-end)
;; tcolorbox.sty -- raster library
- ("tcboxed\\(raster\\|itemize\\)" ispell-tex-arg-end)
- ;; tikz.sty
- ("tikzpicture" . "\\\\end{tikzpicture}")
- ;; fancyvrb.sty: In practice, all verbatim environments have a *
- ;; variant, which sets showspaces=true
- ("\\(Save\\|[BL]\\)?Verbatim\\(\\*\\|Out\\)?" .
- "\\\\end{\\(Save\\|[BL]\\)?Verbatim\\(\\*\\|Out\\)?}")))
+ ("tcboxed\\(raster\\|itemize\\)" ispell-tex-arg-end)))
;; No customization below this line
@@ -303,6 +327,11 @@ argument and spell check the mandatory one."))
(regexp-opt TeX-ispell-skip-envs-opt-arg-list t))
"Regexp of LaTeX environments with an opt argument to be skipped.")
+(defvar TeX-ispell-skip-envs-regexp
+ (eval-when-compile
+ (regexp-opt TeX-ispell-skip-envs-list t))
+ "Regexp of LaTeX environments which will be skipped entirely.")
+
;; Make them available to Ispell:
(TeX-ispell-skip-setcar
`((,TeX-ispell-skip-cmds-opt-arg-regexp ispell-tex-arg-end 0)
@@ -311,7 +340,9 @@ argument and spell check the mandatory one."))
(,TeX-ispell-skip-cmds-three-args-regexp ispell-tex-arg-end 3)))
(TeX-ispell-skip-setcdr
- `((,TeX-ispell-skip-envs-opt-arg-regexp ispell-tex-arg-end 0)))
+ `((,TeX-ispell-skip-envs-opt-arg-regexp ispell-tex-arg-end 0)
+ ,(cons TeX-ispell-skip-envs-regexp
+ (concat "\\\\end{" TeX-ispell-skip-envs-regexp "}"))))
(provide 'tex-ispell)
- [elpa] externals/auctex 474981f 05/95: Show summary of tests at the end of make check, (continued)
- [elpa] externals/auctex 474981f 05/95: Show summary of tests at the end of make check, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 15960e4 06/95: Add makeglossaries to the list of commands, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex b714739 09/95: Add \citetitle to `reftex-cite-format' in style/biblatex, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex ccd67c2 17/95: ; * style/breqn.el ("breqn"): Add missing starred version of array., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex c886a1b 10/95: Check if label is defined before adding it to known labels, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 74766b4 03/95: Remove also a gitignore, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 7230fec 07/95: * latex.el (LaTeX-newline): Make interactive. See bug#24412., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a77e75a 15/95: ; * doc/changes.texi: Improve wording., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 76a2b5f 18/95: * tex-ispell.el: Add support for enviroments from breqn.sty., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 558da5f 24/95: * latex/preview.dtx: Fix example for \PreviewMacro* macro., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 73ccc38 22/95: Simplify addition of entirely skipped environments,
Tassilo Horn <=
- [elpa] externals/auctex 4f2a322 16/95: Fix plain-TeX-auto-regexp-list docstring, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex fbe0782 11/95: Add `NO-INSERT' argument to `LaTeX-label', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex d54e747 19/95: Fix font-latex-after-hacking-local-variables on XEmacs, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 1b3f6e8 13/95: Update style/listings.el to use `LaTeX-env-label-as-keyval', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex ec7caff 14/95: Add new style/breqn.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 5708567 26/95: Improve parsing process in style/color.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex c21aff6 31/95: ; Add `LaTeX-equation-label' as symbol to `LaTeX-label-alist', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex c0f3659 21/95: Fix TeX-view-predicate-list-builtin predicates wrt class opts, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6c91dba 20/95: Fix number of arguments of local-variable-p in XEmacs, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex e18e46e 32/95: * latex.el (LaTeX-label): Eliminate premature returning of label., Tassilo Horn, 2017/04/16