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

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

[elpa] elpa 22f9450 30/35: Use `TeX-ispell-skip-setcar' on user defined


From: Tassilo Horn
Subject: [elpa] elpa 22f9450 30/35: Use `TeX-ispell-skip-setcar' on user defined index macros
Date: Thu, 1 Sep 2016 15:57:50 +0000 (UTC)

branch: elpa
commit 22f94507cdf768b49bc480a3bdd212e8d2ac7824
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Use `TeX-ispell-skip-setcar' on user defined index macros
    
    * style/splitidx.el (LaTeX-splitidx-newindex-regex): Replace wrong
    `^}' with `^]'.
    (LaTeX-splitidx-auto-cleanup, "splitidx"): Use
    `TeX-ispell-skip-setcar' on user defined index macros.
---
 style/splitidx.el |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/style/splitidx.el b/style/splitidx.el
index 0c3ddf0..a2d9be7 100644
--- a/style/splitidx.el
+++ b/style/splitidx.el
@@ -96,7 +96,7 @@
 
 (defvar LaTeX-splitidx-newindex-regex
   `(,(concat "\\\\new\\(?:protected\\)?index"
-            "\\(?:\\[[^}]*\\]\\)?"
+            "\\(?:\\[[^]]*\\]\\)?"
             "{\\([^}]+\\)}")
     1 LaTeX-auto-splitidx-newindex)
   "Matches the argument of `\\newindex' from `splitidx.sty'.")
@@ -108,9 +108,11 @@
 (defun LaTeX-splitidx-auto-cleanup ()
   "Process parsed results for \"splitidx.sty\"."
   (when (LaTeX-provided-package-options-member "splitidx" "idxcommands")
-    (dolist (elt (mapcar 'car (LaTeX-splitidx-newindex-list)))
+    (dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list)))
       ;; Make every element available as a command
       (TeX-add-symbols `(,elt TeX-arg-index))
+      ;; Add new macros's to `ispell-tex-skip-alist': skip one argument
+      (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end)))
       ;; font-locking
       (when (and (featurep 'font-latex)
                 (eq TeX-install-font-lock 'font-latex-setup))
@@ -265,9 +267,11 @@
    ;; instead of \sindex[foo]{<entry>}
    (when (and (LaTeX-provided-package-options-member "splitidx" "idxcommands")
              (LaTeX-splitidx-newindex-list))
-     (dolist (elt (mapcar 'car (LaTeX-splitidx-newindex-list)))
+     (dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list)))
        ;; Make every `foo' available as a command
        (TeX-add-symbols `(,elt TeX-arg-index))
+       ;; Add new macros's to `ispell-tex-skip-alist': skip one argument
+       (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end)))
        ;; Cater for font-locking
        (when (and (featurep 'font-latex)
                  (eq TeX-install-font-lock 'font-latex-setup))



reply via email to

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