branch: externals/auctex commit 9100b87068b08bc5ffd4abf7e6e3c07956386537 Author: Ikumi Keita <ik...@ikumi.que.jp> Commit: Ikumi Keita <ik...@ikumi.que.jp>
Use `write-contents-functions' instead of `write-file-functions' * tex.el (VirTeX-common-initialization): * latex.el (BibTeX-auto-store): Use `write-contents-functions' instead of `write-file-functions' to store `TeX-safe-auto-write' because the latter is cleared by C-x C-w (write-file). * doc/changes.texi (News in 13.0): Mention the bug fix. --- doc/changes.texi | 5 +++++ latex.el | 2 +- tex.el | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/changes.texi b/doc/changes.texi index cc0156f..d5de532 100644 --- a/doc/changes.texi +++ b/doc/changes.texi @@ -12,6 +12,11 @@ @itemize @bullet @item +Since @AUCTeX{} 12.2, @kbd{C-x C-w} accidentally disabled the parse on +save in that buffer, even when you enabled @code{TeX-auto-save} option. +This bug was fixed. + +@item @AUCTeX{} now requires GNU Emacs 24.3 or higher. @item diff --git a/latex.el b/latex.el index 2a21802..d6768c4 100644 --- a/latex.el +++ b/latex.el @@ -1988,7 +1988,7 @@ The value is actually the tail of the list of options given to PACKAGE." It will setup BibTeX to store keys in an auto file." ;; We want this to be early in the list, so we do not ;; add it before we enter BibTeX mode the first time. - (add-hook 'write-file-functions #'TeX-safe-auto-write nil t) + (add-hook 'write-contents-functions #'TeX-safe-auto-write nil t) (TeX-bibtex-set-BibTeX-dialect) (set (make-local-variable 'TeX-auto-update) 'BibTeX) (set (make-local-variable 'TeX-auto-untabify) nil) diff --git a/tex.el b/tex.el index 936671a..37a7c32 100644 --- a/tex.el +++ b/tex.el @@ -3715,7 +3715,7 @@ The algorithm is as follows: ;; We want this to be early in the list, so we do not add it before ;; we enter TeX mode the first time. - (add-hook 'write-file-functions #'TeX-safe-auto-write nil t) + (add-hook 'write-contents-functions #'TeX-safe-auto-write nil t) (set (make-local-variable 'TeX-auto-update) t) (define-key TeX-mode-map "\C-xng" 'TeX-narrow-to-group)