[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 7209776 46/57: Skip macros and en
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 7209776 46/57: Skip macros and environments from tcolorbox and raster library |
Date: |
Wed, 11 Jan 2017 18:01:42 +0000 (UTC) |
branch: externals/auctex
commit 7209776eddeee0d01adf8f72ba4b5495c4bb7542
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Skip macros and environments from tcolorbox and raster library
* tex-ispell.el (TeX-ispell-sort-skip-cmds-list): Extract macros
with optional argument from `TeX-ispell-skip-cmds-list'.
(TeX-ispell-skip-cmds-opt-arg-regexp): New variable containing
macros where only the optional argument is skipped while spell
checking.
Add macros and environments from tcolorbox.el and
tcolorboxlib-raster.el.
---
tex-ispell.el | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/tex-ispell.el b/tex-ispell.el
index 9578a91..2eb13c0 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2016 Free Software Foundation, Inc.
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
;; Maintainer: address@hidden
;; Keywords: tex, wp, convenience
@@ -59,6 +59,7 @@
;; splitidx.sty
;; tabularx.sty
;; tabulary.sty
+;; tcolorbox.sty
;; tikz.sty
;; varioref.sty
@@ -173,6 +174,12 @@
("SI" . 2)
;; splitidx.sty
("sindex" . 1)
+ ;; tcolorbox.sty
+ ("tcbox" . 0)
+ ("tcbset" . 1)
+ ("tcbsetforeverylayer" . 1)
+ ;; tcolorbox.sty -- raster library
+ ("tcbitem" . 0)
;; varioref.sty
("vref" . 1)
("Vref" . 1)
@@ -184,11 +191,12 @@
("vrefrange" . 2)
("vrefrange*" . 2)
("vpagerefrange" . 2)
- ("vpagerefrange*" . 2) )
+ ("vpagerefrange*" . 2))
"List of commands with arguments to be skipped.
Each element of the list is a cons cell with command name
\(string) as car and the number of mandatory arguments to be
-skipped as cdr."))
+skipped as cdr. If number is 0, then only skip over the optional
+argument and spell check the mandatory one."))
;; Add new environments with one optional argument here:
@@ -202,7 +210,12 @@ skipped as cdr."))
"itemize"
"itemize*"
;; mdframed.sty
- "mdframed")
+ "mdframed"
+ ;; tcolorbox.sty
+ "tcolorbox"
+ ;; tcolorbox.sty -- raster library
+ "tcbraster"
+ "tcbitemize")
"List of LaTeX environments with an opt argument to be skipped."))
@@ -235,6 +248,8 @@ skipped as cdr."))
("minted" . "\\end{minted}")
;; 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 *
@@ -248,13 +263,19 @@ skipped as cdr."))
(eval-when-compile
(defun TeX-ispell-sort-skip-cmds-list (arg)
"Return elements from `TeX-ispell-skip-cmds-list' acc. to ARG."
- (when (member arg '(1 2 3))
+ (when (member arg '(0 1 2 3))
(let (cmds)
(dolist (elt TeX-ispell-skip-cmds-list)
(when (= (cdr elt) arg)
(push (car elt) cmds)))
cmds))))
+(defvar TeX-ispell-skip-cmds-opt-arg-regexp
+ (eval-when-compile
+ (concat "\\"
+ (regexp-opt (TeX-ispell-sort-skip-cmds-list 0) t)))
+ "Regexp of LaTeX commands with only optional arguments to be skipped.")
+
(defvar TeX-ispell-skip-cmds-one-arg-regexp
(eval-when-compile
(concat "\\"
@@ -280,7 +301,8 @@ skipped as cdr."))
;; Make them available to Ispell:
(TeX-ispell-skip-setcar
- `((,TeX-ispell-skip-cmds-one-arg-regexp ispell-tex-arg-end)
+ `((,TeX-ispell-skip-cmds-opt-arg-regexp ispell-tex-arg-end 0)
+ (,TeX-ispell-skip-cmds-one-arg-regexp ispell-tex-arg-end)
(,TeX-ispell-skip-cmds-two-args-regexp ispell-tex-arg-end 2)
(,TeX-ispell-skip-cmds-three-args-regexp ispell-tex-arg-end 3)))
- [AUCTeX-diffs] [elpa] externals/auctex ea7f427 28/57: Improve multi-level script fontification, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex ea7f427 28/57: Improve multi-level script fontification, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex c541d75 20/57: Fix the names also in expert macros, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 377a97a 32/57: Completion for math macros, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 3a5ed08 38/57: Support biblatex cite format in all Emacsen, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 4c59f77 42/57: Adapt Makefile to new ChangeLog file name, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex d185bcb 49/57: * Makefile.in (release-commit): Fix name of preview ChangeLog., Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 74c5ac9 09/57: Update style/tcolorbox.el to package v3.96, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 501b0de 47/57: Use RefTeX for multiple references in cleveref, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex fb6333b 45/57: ; * doc/install.texi (Installation): Guard reference in "@ifclear rawfile"., Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 826f17a 54/57: Release_11.90, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 7209776 46/57: Skip macros and environments from tcolorbox and raster library,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 6c155cc 33/57: Refactor normal completion and completion at point a bit, Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex a9ec6ba 01/57: Update style/minted.el to package version 2.4.1., Tassilo Horn, 2017/01/11
- [AUCTeX-diffs] [elpa] externals/auctex 67c081d 53/57: ; make change-history-commit, Tassilo Horn, 2017/01/11