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

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

[elpa] externals/auctex dbeb71f 04/26: Improve style.


From: Tassilo Horn
Subject: [elpa] externals/auctex dbeb71f 04/26: Improve style.
Date: Fri, 13 Nov 2015 17:00:32 +0000

branch: externals/auctex
commit dbeb71fcb1c1922819cfc7671dc3e9522939796a
Author: Arash Esbati <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Improve style.
    
    * style/enumitem.el (LaTeX-enumitem-auto-cleanup): Move some
    operations from style hook into this function.
    (LaTeX-enumitem-newlist-list-item-arg-local): Delete now unused
    variable.
---
 ChangeLog         |    5 +++++
 style/enumitem.el |   29 ++++++++++-------------------
 2 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4178918..3f5aec6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-10-24  Arash Esbati  <address@hidden>
 
+       * style/enumitem.el (LaTeX-enumitem-auto-cleanup): Move some
+       operations from style hook into this function.
+       (LaTeX-enumitem-newlist-list-item-arg-local): Delete now unused
+       variable.
+
        * style/amsthm.el (LaTeX-amsthm-theoremstyle-list): New variable
        replacing the deleted function
        `LaTeX-amsthm-complete-theoremstyle'.
diff --git a/style/enumitem.el b/style/enumitem.el
index dff94aa..a527c86 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -116,11 +116,6 @@ plus available through `enumitem' package.")
   "List of description like environments defined by command
 `\\newlist' from `enumitem' package.")
 
-(defvar LaTeX-enumitem-newlist-list-item-arg-local nil
-  "Local list of all description like environments defined by command
-`\\newlist' plus available through `enumitem' package.")
-(make-variable-buffer-local 'LaTeX-enumitem-newlist-list-item-arg-local)
-
 (defvar LaTeX-auto-enumitem-newlist nil
   "Temporary for parsing the arguments of `\\newlist' from
 `enumitem' package.")
@@ -183,7 +178,16 @@ package.")
       (when (or (string-equal type "description")
                (string-equal type "description*"))
        (add-to-list 'LaTeX-enumitem-newlist-list-item-arg
-                    (list env))))))
+                    (list env)))))
+  ;; Now add the parsed env's to the local list.
+  (when LaTeX-enumitem-newlist-list
+    (setq LaTeX-enumitem-newlist-list-local
+         (append LaTeX-enumitem-newlist-list
+                 LaTeX-enumitem-newlist-list-local)))
+  ;; Tell AUCTeX about parsed description like environments.
+  (when LaTeX-enumitem-newlist-list-item-arg
+    (dolist (env LaTeX-enumitem-newlist-list-item-arg)
+      (add-to-list 'LaTeX-item-list `(,(car env) . LaTeX-item-argument)))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-enumitem-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-enumitem-auto-cleanup t)
@@ -302,19 +306,6 @@ in `enumitem'-completions."
           (append '(("itemize*") ("enumerate*") ("description*"))
                   LaTeX-enumitem-newlist-list-local)))
 
-   ;; Now add the parsed env's to the local list.
-   (setq LaTeX-enumitem-newlist-list-local
-        (append LaTeX-enumitem-newlist-list
-                LaTeX-enumitem-newlist-list-local))
-
-   ;; Move parsed description like env's into a local variable.
-   (setq LaTeX-enumitem-newlist-list-item-arg-local
-        LaTeX-enumitem-newlist-list-item-arg)
-
-   ;; Tell AUCTeX about special items parsed
-   (dolist (env LaTeX-enumitem-newlist-list-item-arg-local)
-    (add-to-list 'LaTeX-item-list `(,(car env) . LaTeX-item-argument)))
-
    ;; Standard env's take key-val as optional argument.
    (LaTeX-add-environments
     '("itemize"      LaTeX-enumitem-env-with-opts)



reply via email to

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