[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 6050e27 12/34: Add new variable `
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 6050e27 12/34: Add new variable `TeX-normal-mode-reset-list' |
Date: |
Sun, 6 Jun 2021 11:40:02 -0400 (EDT) |
branch: externals/auctex
commit 6050e275d094d9a50f8035b27c29c1f11464e709
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
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.
---
latex.el | 16 +++++++++++++++-
style/graphicx.el | 3 +++
tex.el | 25 +++++++------------------
3 files changed, 25 insertions(+), 19 deletions(-)
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)
- [AUCTeX-diffs] [elpa] externals/auctex updated (3e163e5 -> 6c32b97), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 1193619 02/34: ; Silence the compiler, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex dc425b7 05/34: Make `TeX-run-format' self-contained (bug#48144), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 431375f 04/34: Support new kernel macro \footref, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 9f7bddc 07/34: ; * style/thmtools.el (LaTeX-thmtools-env-label): Fix quote., Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 4309e91 15/34: ; * tex.el (TeX-command-list): Remove linebreak in :help string., Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 95c3acf 06/34: Ensure rawness of data to compute MD5, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 6050e27 12/34: Add new variable `TeX-normal-mode-reset-list',
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex b852059 10/34: ; Improve previous commit, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 2959334 11/34: ; Improve previous commit again, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex a8e1a5d 18/34: Update documentation, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex a6121fb 13/34: Fix fontification when $ is unclosed in buffer, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 1ded6fc 24/34: Fix markups in documents, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex afab0e0 17/34: Indent region (bug#48518), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 70907dd 09/34: Skip inline math $ inside comments (bug#48365), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 3c8e583 08/34: Introduce new variable `LaTeX-global-package-files', Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 8990190 16/34: Improve style/algorithm.el, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex b5f34a9 23/34: Followup my commit on May 6, Tassilo Horn, 2021/06/06