branch: elpa commit 9e3230fbad2bc865f5e500973abb032abf7a74ea Author: Arash Esbati <arash.esb...@gmail.com> Commit: Arash Esbati <arash.esb...@gmail.com>
Use `TeX-ispell-skip-setcdr' on user defined list environments * style/enumitem.el (LaTeX-enumitem-auto-cleanup): Use `TeX-ispell-skip-setcdr' on user defined lists. ("enumitem"): Use `TeX-ispell-skip-setcdr' on user defined lists. Use `TeX-argument-insert' instead of `insert'. --- style/enumitem.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/style/enumitem.el b/style/enumitem.el index c81cd96..02e3a25 100644 --- a/style/enumitem.el +++ b/style/enumitem.el @@ -171,7 +171,9 @@ package.") ;; Tell AUCTeX about parsed description like environments. (when (or (string-equal type "description") (string-equal type "description*")) - (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument))))) + (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument))) + ;; Add new env's to `ispell-tex-skip-alist': skip the optional argument + (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0))))) ;; Now add the parsed env's to the local list. (when (LaTeX-enumitem-newlist-list) (setq LaTeX-enumitem-newlist-list-local @@ -344,9 +346,10 @@ in `enumitem'-completions." (add-to-list 'LaTeX-item-list `(,name . LaTeX-item-argument))) (LaTeX-add-environments `(,name LaTeX-enumitem-env-with-opts)) (LaTeX-add-enumitem-newlists (list name type)) - (insert (format "{%s}" name) - (format "{%s}" type)) - (format "%s" depth))))) + (TeX-ispell-skip-setcdr `((,name ispell-tex-arg-end 0))) + (TeX-argument-insert name optional) + (TeX-argument-insert type optional) + (format "%s" depth))))) ;; \renewlist{<name>}{<type>}{<max-depth>} '("renewlist"