branch: externals/auctex
commit ce78d8a79759fb1497b3a4e6a3ce7aa2706dcd01
Author: Arash Esbati <ar...@gnu.org>
Commit: Arash Esbati <ar...@gnu.org>

    Fix reset of `LaTeX-provided-(class|package)-options'
    
    * latex.el: Add `LaTeX-provided-class-options' and
    `LaTeX-provided-package-options' to `TeX-normal-mode-reset-list'.
    (LaTeX-auto-cleanup): Don't reset the variables.  (bug#78296)
---
 latex.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/latex.el b/latex.el
index f4c206fa2a..6361ef3ed9 100644
--- a/latex.el
+++ b/latex.el
@@ -1943,6 +1943,8 @@ For example, its value will be
    ...)
 See also `LaTeX-provided-package-options'.")
 
+(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-provided-class-options)
+
 (defun LaTeX-provided-class-options-member (class option)
   "Return non-nil if OPTION has been given to CLASS at load time.
 The value is actually the tail of the list of options given to CLASS."
@@ -1966,6 +1968,8 @@ For example, its value will be
    ...)
 See also `LaTeX-provided-class-options'.")
 
+(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-provided-package-options)
+
 (defun LaTeX-provided-package-options-member (package option)
   "Return non-nil if OPTION has been given to PACKAGE at load time.
 The value is actually the tail of the list of options given to PACKAGE."
@@ -2136,10 +2140,6 @@ TYPE is one of the symbols mac or env."
                                   (split-string arg ","))
                                 LaTeX-auto-bibliography)))
 
-  ;; Reset class and packages options for the current buffer
-  (setq LaTeX-provided-class-options nil)
-  (setq LaTeX-provided-package-options nil)
-
   ;; Cleanup document classes and packages
   (unless (null LaTeX-auto-style)
     (while LaTeX-auto-style

Reply via email to