branch: elpa
commit 255efa3860d3ae164e5c26482d8c143c91c3c7e5
Author: Mosè Giordano <[email protected]>
Commit: Mosè Giordano <[email protected]>
Write TeX-style-hook-dialect to parsed file
* latex.el (BibTeX-auto-store): Run `TeX-bibtex-set-BibTeX-dialect'.
* tex.el (TeX-auto-store): Store `TeX-style-hook-dialect' from buffer
and write it to parsed file when present.
---
latex.el | 1 +
tex.el | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/latex.el b/latex.el
index ba2882c..e46fb86 100644
--- a/latex.el
+++ b/latex.el
@@ -1745,6 +1745,7 @@ It will setup BibTeX to store keys in an auto file."
(if (boundp 'local-write-file-hooks)
(add-hook 'local-write-file-hooks 'TeX-safe-auto-write)
(add-hook 'write-file-hooks 'TeX-safe-auto-write))
+ (TeX-bibtex-set-BibTeX-dialect)
(set (make-local-variable 'TeX-auto-update) 'BibTeX)
(set (make-local-variable 'TeX-auto-untabify) nil)
(set (make-local-variable 'TeX-auto-parse-length) 999999)
diff --git a/tex.el b/tex.el
index 72750a9..c2c247c 100644
--- a/tex.el
+++ b/tex.el
@@ -3864,7 +3864,8 @@ If TEX is a directory, generate style files for all files
in the directory."
(verb-macros-delims (when (boundp
'LaTeX-verbatim-macros-with-delims-local)
LaTeX-verbatim-macros-with-delims-local))
(verb-macros-braces (when (boundp
'LaTeX-verbatim-macros-with-braces-local)
- LaTeX-verbatim-macros-with-braces-local)))
+ LaTeX-verbatim-macros-with-braces-local))
+ (dialect TeX-style-hook-dialect))
(TeX-unload-style style)
(with-current-buffer (generate-new-buffer file)
(erase-buffer)
@@ -3890,7 +3891,9 @@ If TEX is a directory, generate style files for all files
in the directory."
env)))
(mapc (lambda (el) (TeX-auto-insert el style))
TeX-auto-parser)
- (insert "))\n\n")
+ (insert ")")
+ (if dialect (insert (concat "\n " (prin1-to-string dialect))))
+ (insert ")\n\n")
(write-region (point-min) (point-max) file nil 'silent)
(kill-buffer (current-buffer))))
(if (file-exists-p (concat file "c"))