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

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

[elpa] elpa d3d05d4 12/26: Make some buffer-local vars document-local.


From: Tassilo Horn
Subject: [elpa] elpa d3d05d4 12/26: Make some buffer-local vars document-local.
Date: Tue, 27 Jan 2015 12:11:15 +0000

branch: elpa
commit d3d05d462afbe69687277f7fc0dd09e6ef2ff113
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Make some buffer-local vars document-local.
    
    * tex.el (TeX-auto-store): Write LaTeX-verbatim-*-local variables
    to auto file to make them document-local.
---
 ChangeLog |    3 +++
 tex.el    |   17 ++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 142694c..641764b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-12-20  Tassilo Horn  <address@hidden>
 
+       * tex.el (TeX-auto-store): Write LaTeX-verbatim-*-local variables
+       to auto file to make them document-local.
+
        * style/minted.el (LaTeX-minted-auto-cleanup): Recognize macros
        generated by \newmint, \newmintinline, and \newmintedfile, too.
 
diff --git a/tex.el b/tex.el
index 0ef5399..713a476 100644
--- a/tex.el
+++ b/tex.el
@@ -3699,7 +3699,10 @@ If TEX is a directory, generate style files for all 
files in the directory."
            (class-opts (if (boundp 'LaTeX-provided-class-options)
                            LaTeX-provided-class-options))
            (pkg-opts (if (boundp 'LaTeX-provided-package-options)
-                         LaTeX-provided-package-options)))
+                         LaTeX-provided-package-options))
+           (verb-envs          LaTeX-verbatim-environments-local)
+           (verb-macros-delims LaTeX-verbatim-macros-with-delims-local)
+           (verb-macros-braces LaTeX-verbatim-macros-with-braces-local))
        (TeX-unload-style style)
        (with-current-buffer (generate-new-buffer file)
          (erase-buffer)
@@ -3711,6 +3714,18 @@ If TEX is a directory, generate style files for all 
files in the directory."
          (when pkg-opts
            (insert "\n   (TeX-add-to-alist 'LaTeX-provided-package-options\n"
                    "                     '" (prin1-to-string pkg-opts) ")"))
+         (dolist (env verb-envs)
+           (insert
+            (format "\n  (add-to-list 'LaTeX-verbatim-environments-local 
\"%s\")"
+                    env)))
+         (dolist (env verb-macros-braces)
+           (insert
+            (format "\n  (add-to-list 'LaTeX-verbatim-macros-with-braces-local 
\"%s\")"
+                    env)))
+         (dolist (env verb-macros-delims)
+           (insert
+            (format "\n  (add-to-list 'LaTeX-verbatim-macros-with-delims-local 
\"%s\")"
+                    env)))
          (mapc (lambda (el) (TeX-auto-insert el style))
                TeX-auto-parser)
          (insert "))\n\n")



reply via email to

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