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. 3df1e313ea852b7dc2f86


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3df1e313ea852b7dc2f86a5fec5f28c3881e9e58
Date: Tue, 15 Mar 2022 12:18:43 -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  3df1e313ea852b7dc2f86a5fec5f28c3881e9e58 (commit)
      from  36655f6a5ed9ffc6552e1cab6f7a8b021b8ad7ca (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 3df1e313ea852b7dc2f86a5fec5f28c3881e9e58
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Tue Mar 15 17:16:24 2022 +0100

    Adapt TeX-region-hook for lexical-binding
    
    * tex-buf.el (TeX-region-hook): Update docstring.
    (TeX-region-orig-buffer): Convert to defvar-local.
    (TeX-region-master-buffer): New variable.
    (TeX-region-create): Set TeX-region-master-buffer in addition to
    TeX-region-orig-buffer before runnig TeX-region-hook.

diff --git a/tex-buf.el b/tex-buf.el
index eeff2fc0..bc363a1d 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2069,9 +2069,10 @@ The compatibility argument IGNORE is ignored."
 (defvar TeX-region-hook nil
   "List of hooks to run before the region file is saved.
 The hooks are run in the region buffer, you may use the variable
-`master-buffer' to access the buffer of the master file and
-`orig-buffer' to access the buffer where \\[TeX-command-region] or
-\\[TeX-command-buffer] is invoked from.")
+`TeX-region-master-buffer' to access the buffer of the master
+file and `TeX-region-orig-buffer' to access the buffer where
+\\[TeX-command-region] or \\[TeX-command-buffer] is invoked
+from.")
 
 (defun TeX-quote-filename (file)
   "Convert file name into a form acceptable to TeX."
@@ -2110,9 +2111,12 @@ The hooks are run in the region buffer, you may use the 
variable
                                 "\\\\unexpanded{\\&}" file t)
     file))
 
-(defvar TeX-region-orig-buffer nil
+(defvar-local TeX-region-orig-buffer nil
   "The original buffer in which the TeX-region was created.")
-(make-variable-buffer-local 'TeX-region-orig-buffer)
+
+(defvar-local TeX-region-master-buffer nil
+  "The TeX-master buffer of the document for which the TeX-region
+was created.")
 
 (defun TeX-region-create (file region original offset)
   "Create a new file named FILE with the string REGION.
@@ -2238,6 +2242,7 @@ original file."
                 ") }\n"
                 trailer)
         (setq TeX-region-orig-buffer orig-buffer)
+        (setq TeX-region-master-buffer master-buffer)
         (run-hooks 'TeX-region-hook)
         (if (string-equal (buffer-string) original-content)
             (set-buffer-modified-p nil)

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

Summary of changes:
 tex-buf.el | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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