emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex d5951e6 79/95: Improve skipping of inline verbat


From: Tassilo Horn
Subject: [elpa] externals/auctex d5951e6 79/95: Improve skipping of inline verbatim macros
Date: Sun, 16 Apr 2017 01:27:01 -0400 (EDT)

branch: externals/auctex
commit d5951e68d492e6b7509fb18fdc98622c003a3c76
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Improve skipping of inline verbatim macros
    
    * tex-ispell.el (TeX-ispell-verb-opening-delimiters)
    (TeX-ispell-verb-closing-delimiters): New customizable options.
    (TeX-ispell-skip-setcar): Skip inline verbatim macros from
    listings and fancyvrb package.  Use new variables for minted
    package.
---
 tex-ispell.el | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/tex-ispell.el b/tex-ispell.el
index 7fba305..0b08f40 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -72,6 +72,18 @@
 
 (require 'tex)
 
+(defcustom TeX-ispell-verb-opening-delimiters "{!|#\"*/+-"
+  "String with all opening delimiters for verb macros.
+The elements must match `TeX-ispell-verb-closing-delimiters'."
+  :group 'TeX-misc
+  :type 'string)
+
+(defcustom TeX-ispell-verb-closing-delimiters "}!|#\"*/+-"
+  "String with all closing delimiters for verb macros.
+The elements must match `TeX-ispell-verb-opening-delimiters'."
+  :group 'TeX-misc
+  :type 'string)
+
 ;; Add new macros here:
 (eval-when-compile
   (defvar TeX-ispell-skip-cmds-list
@@ -281,19 +293,23 @@ Environments for math or verbatim text are candidates for 
this list."))
 
 ;; Add others delimited here:
 (TeX-ispell-skip-setcar
- '(;; LaTeX-base
+ `(;; LaTeX-base
    ("\\\\(" . "\\\\)")
    ("\\\\raisebox" TeX-ispell-tex-arg-end 1 2 0)
    ;; booktabs.sty
    ("\\\\cmidrule" . "{[-0-9]+}")
    ;; fontspec.sty
    ("\\\\fontspec" TeX-ispell-tex-arg-end 1 1 0)
+   ;; listings.sty & fancyvrb.sty:
+   (,(concat "\\\\\\(lstinline\\|Verb\\)\\(\\[[^]]*\\]\\)?"
+            "[" TeX-ispell-verb-opening-delimiters "]")
+    .
+    ,(concat "[" TeX-ispell-verb-closing-delimiters "]"))
    ;; minted.sty
-   ("\\\\mint\\(inline\\)?\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}{" . "}")
-   ("\\\\mint\\(inline\\)?\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}|" . "|")
-   ("\\\\mint\\(inline\\)?\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}#" . "#")
-   ("\\\\mint\\(inline\\)?\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}\\+" . "\\+")
-   ("\\\\mint\\(inline\\)?\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}\\*" . "\\*")))
+   (,(concat "\\\\mint\\(inline\\)?\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}"
+            "[" TeX-ispell-verb-opening-delimiters "]")
+    .
+    ,(concat "[" TeX-ispell-verb-closing-delimiters "]"))))
 
 
 ;; Add environments here:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]