auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex da52023 24/25: Discard `TeX-auto-


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex da52023 24/25: Discard `TeX-auto-update' to silence byte compiler
Date: Sun, 21 Mar 2021 11:44:43 -0400 (EDT)

branch: externals/auctex
commit da52023fa715253c0c9d70838c6feda292df0d28
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Discard `TeX-auto-update' to silence byte compiler
    
    Now that we add `TeX-safe-auto-write' as local hook in
    `write-contents-functions', we don't have to check every time whether
    it is AUCTeX buffer.
    
    * latex.el (BibTeX-auto-store):
    * tex-info.el (TeX-texinfo-mode):
    Don't set `TeX-auto-update'.
    * tex.el (VirTeX-common-initialization): Don't set `TeX-auto-update'.
    (TeX-safe-auto-write): Don't check whether it is AUCTeX buffer or
    BibTeX buffer.
    (TeX-update-style): Consult `major-mode' instead of `TeX-auto-update'
    to check whether it is BibTeX buffer.
    * bib-cite.el: Don't use `TeX-auto-update'. Consult `TeX-mode-p' to
    check whether it is AUCTeX buffer.
---
 bib-cite.el | 8 ++++----
 latex.el    | 1 -
 tex-info.el | 1 -
 tex.el      | 8 ++------
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/bib-cite.el b/bib-cite.el
index 0799c40..4e598eb 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -1022,7 +1022,9 @@ cases, *it* is searched.  This allows you to trim down a 
search further
 by using bib-apropos sequentially."
   ;;(interactive "sBibTeX apropos: ")
   (interactive)
-  (let* ((keylist (and (boundp 'TeX-auto-update) ;Avoid error in FRAMEPOP
+  (let* ((keylist (and (boundp 'TeX-mode-p)
+                       (or TeX-mode-p
+                           (eq major-mode 'bibtex-mode)) ;Avoid error in 
FRAMEPOP
                        (fboundp 'LaTeX-bibitem-list) ;Use this if using auctex
                        (LaTeX-bibitem-list)))
          (keyword (bib-apropos-keyword-at-point))
@@ -2166,7 +2168,7 @@ of each bib file.
 Puts the buffer in text-mode such that forward-sexp works with german \"
 accents embeded in bibtex entries."
   (let ((bib-list (or (and (fboundp 'LaTeX-bibliography-list)
-                           (boundp 'TeX-auto-update)
+                           (boundp 'TeX-mode-p) TeX-mode-p
                            (LaTeX-bibliography-list))
 ;; LaTeX-bibliography-list (if bound) returns an unformatted list of
 ;; bib files used in the document, but only if parsing is turned on
@@ -2250,7 +2252,6 @@ although BiBTeX doesn't allow it!"
         (mapcar 'list the-list)))))
 
 (defvar TeX-auto-save)
-(defvar TeX-auto-update)
 (defvar TeX-auto-regexp-list)
 
 ;; BibTeX-mode key def to create AUCTeX's parsing file.
@@ -2260,7 +2261,6 @@ although BiBTeX doesn't allow it!"
   (if (not (require 'latex))
       (error "Sorry, This is only useful if you have AUCTeX"))
   (let ((TeX-auto-save t)
-        (TeX-auto-update t)
         (TeX-auto-regexp-list BibTeX-auto-regexp-list))
     ;; TeX-auto-write
     ;; -> calls TeX-auto-store
diff --git a/latex.el b/latex.el
index 3385159..d5d5621 100644
--- a/latex.el
+++ b/latex.el
@@ -1990,7 +1990,6 @@ It will setup BibTeX to store keys in an auto file."
   ;; add it before we enter BibTeX mode the first time.
   (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)
   (set (make-local-variable 'TeX-auto-parse-length) 999999)
   (set (make-local-variable 'TeX-auto-regexp-list) BibTeX-auto-regexp-list)
diff --git a/tex-info.el b/tex-info.el
index 2f6a443..c9810d2 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -686,7 +686,6 @@ value of `Texinfo-mode-hook'."
   (set (make-local-variable 'TeX-esc) "@")
 
   (set (make-local-variable 'TeX-auto-regexp-list) 'TeX-auto-empty-regexp-list)
-  (set (make-local-variable 'TeX-auto-update) t)
 
   (setq TeX-command-default "TeX")
   (setq TeX-header-end "%*end")
diff --git a/tex.el b/tex.el
index 11540ee..d67b9f8 100644
--- a/tex.el
+++ b/tex.el
@@ -3060,8 +3060,7 @@ See variable `TeX-style-hook-dialect' for supported 
dialects."
 
 Only do this if it has not been done before, or if optional argument
 FORCE is not nil."
-  (unless (or (and (boundp 'TeX-auto-update)
-                   (eq TeX-auto-update 'BibTeX)) ; Not a real TeX buffer
+  (unless (or (eq major-mode 'bibtex-mode) ; Not a real TeX buffer
               (and (not force)
                    TeX-style-hook-applied-p))
     (setq TeX-style-hook-applied-p t)
@@ -3787,7 +3786,6 @@ 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-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)
 
@@ -3968,9 +3966,7 @@ Generated by `TeX-auto-add-type'.")
 (defun TeX-safe-auto-write ()
   "Call `TeX-auto-write' safely."
   (condition-case _ignored
-      (and (boundp 'TeX-auto-update)
-           TeX-auto-update
-           (TeX-auto-write))
+      (TeX-auto-write)
     (error nil))
   ;; Continue with the other write file hooks.
   nil)




reply via email to

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