branch: elpa commit d3d05d462afbe69687277f7fc0dd09e6ef2ff113 Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
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 <t...@gnu.org> + * 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")