auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6050e275d094d9a50f803


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6050e275d094d9a50f8035b27c29c1f11464e709
Date: Wed, 12 May 2021 06:42:04 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  6050e275d094d9a50f8035b27c29c1f11464e709 (commit)
      from  2959334f519ae687966a33120335034a460fb3bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6050e275d094d9a50f8035b27c29c1f11464e709
Author: Arash Esbati <arash@gnu.org>
Date:   Wed May 12 12:41:04 2021 +0200

    Add new variable `TeX-normal-mode-reset-list'
    
    * latex.el:
    * style/graphicx.el: Add variables to `TeX-normal-mode-reset-list'
    which were hard-coded in `TeX-normal-mode'.
    
    * tex.el (TeX-normal-mode-reset-list): New variable for symbols to
    be reset when the command `TeX-normal-mode' is run with argument.
    (TeX-normal-mode): Remove the hard-coded variables and use
    `TeX-normal-mode-reset-list'.
    Remove the defvar's silencing the compiler.

diff --git a/latex.el b/latex.el
index 1f20960..2e2d209 100644
--- a/latex.el
+++ b/latex.el
@@ -2345,6 +2345,9 @@ and this variable will be ignored."
 Initialized once at the first time you prompt for a LaTeX class.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
 
+;; Add the variable to `TeX-normal-mode-reset-list':
+(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-class-files)
+
 (defcustom TeX-arg-input-file-search t
   "If `TeX-arg-input-file' should search for files.
 If the value is t, files in TeX's search path are searched for
@@ -2429,6 +2432,10 @@ May be reset with `\\[universal-argument] 
\\[TeX-normal-mode]'.")
 Initialized once at the first time you prompt for a LaTeX package.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
 
+;; Add both variables to `TeX-normal-mode-reset-list':
+(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-input-files)
+(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-global-package-files)
+
 (defun LaTeX-arg-usepackage-read-packages-with-options ()
   "Read the packages and the options for the usepackage macro.
 
@@ -2594,6 +2601,10 @@ May be reset with `\\[universal-argument] 
\\[TeX-normal-mode]'.")
 Initialized once at the first time you prompt for a BibLaTeX
 style.  May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
 
+;; Add both variables to `TeX-normal-mode-reset-list':
+(add-to-list 'TeX-normal-mode-reset-list 'BibTeX-global-style-files)
+(add-to-list 'TeX-normal-mode-reset-list 'BibLaTeX-global-style-files)
+
 (defun TeX-arg-bibstyle (optional &optional prompt)
   "Prompt for a BibTeX style file.
 If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -2607,7 +2618,7 @@ string."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "BibTeX style")
                     (append (mapcar #'list (TeX-search-files-by-type
-                                           'bstinputs 'local t t))
+                                            'bstinputs 'local t t))
                             BibTeX-global-style-files))
    optional))
 
@@ -2623,6 +2634,9 @@ May be reset with `\\[universal-argument] 
\\[TeX-normal-mode]'.")
 Initialized once at the first time you prompt for an Biber file.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
 
+(add-to-list 'TeX-normal-mode-reset-list 'BibTeX-global-files)
+(add-to-list 'TeX-normal-mode-reset-list 'TeX-Biber-global-files)
+
 (defun TeX-arg-bibliography (optional &optional prompt)
   "Prompt for a BibTeX database file.
 If OPTIONAL is non-nil, insert the resulting value as an optional
diff --git a/style/graphicx.el b/style/graphicx.el
index bb28b9c..bacd734 100644
--- a/style/graphicx.el
+++ b/style/graphicx.el
@@ -185,6 +185,9 @@ extensions to be matched."
 Initialized once at the first time you prompt for an input file.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
 
+;; Add the variable to `TeX-normal-mode-reset-list':
+(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-includegraphics-global-files)
+
 (defun LaTeX-includegraphics-read-file-TeX ()
   "Read image file for \\includegraphics.
 Offers all graphic files found in the TeX search path.  See
diff --git a/tex.el b/tex.el
index e9b8798..44d1a56 100644
--- a/tex.el
+++ b/tex.el
@@ -80,16 +80,9 @@
 (defvar TeX-synctex-tex-flags)
 ;; Variables defined in other AUCTeX libraries:
 ;; latex.el:
-(defvar BibLaTeX-global-style-files)
-(defvar BibTeX-global-files)
-(defvar BibTeX-global-style-files)
 (defvar LaTeX-default-verb-delimiter)
-(defvar LaTeX-global-class-files)
-(defvar LaTeX-global-package-files)
 (defvar LaTeX-optcl)
 (defvar LaTeX-optop)
-(defvar TeX-Biber-global-files)
-(defvar TeX-global-input-files)
 (defvar TeX-output-dir)
 ;; tex-buf.el
 (defvar TeX-current-process-region-p)
@@ -97,8 +90,6 @@
 (defvar TeX-region-orig-buffer)
 ;; tex-ispell.el
 (defvar TeX-ispell-verb-delimiters)
-;; graphicx.el
-(defvar LaTeX-includegraphics-global-files)
 ;; Others:
 (defvar tex--prettify-symbols-alist)    ; tex-mode.el
 (defvar Info-file-list-for-emacs)       ; info.el
@@ -5968,21 +5959,19 @@ sign.  With optional ARG, insert that many dollar 
signs."
 
 ;;; Simple Commands
 
+(defvar TeX-normal-mode-reset-list '(TeX-style-hook-list)
+  "List of variables to reset with `\\[universal-argument] 
\\[TeX-normal-mode]'.
+AUCTeX libraries and styles should add variables for reset to
+this list.")
+
 (defun TeX-normal-mode (&optional arg)
   "Remove all information about this buffer, and apply the style hooks again.
 Save buffer first including style information.
 With optional argument ARG, also reload the style hooks."
   (interactive "*P")
   (if arg
-      (setq TeX-style-hook-list nil
-            BibTeX-global-style-files nil
-            BibTeX-global-files nil
-            BibLaTeX-global-style-files nil
-            TeX-Biber-global-files nil
-            TeX-global-input-files nil
-            LaTeX-global-class-files nil
-            LaTeX-global-package-files nil
-            LaTeX-includegraphics-global-files nil))
+      (dolist (var TeX-normal-mode-reset-list)
+        (set var nil)))
   (let ((TeX-auto-save t))
     (if (buffer-modified-p)
         (save-buffer)

-----------------------------------------------------------------------

Summary of changes:
 latex.el          | 16 +++++++++++++++-
 style/graphicx.el |  3 +++
 tex.el            | 25 +++++++------------------
 3 files changed, 25 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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