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. 33cee842a2a53b4f3fed5


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 33cee842a2a53b4f3fed5a66792a555b4c95bd2e
Date: Tue, 01 Sep 2015 19:38:28 +0000

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  33cee842a2a53b4f3fed5a66792a555b4c95bd2e (commit)
      from  400609e380524a6b307983e2b6084271ff310c12 (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 33cee842a2a53b4f3fed5a66792a555b4c95bd2e
Author: Tassilo Horn <address@hidden>
Date:   Tue Sep 1 21:37:09 2015 +0200

    Allow TeX-command-sequence to process the region
    
    * tex-buf.el (TeX-command-sequence): Add argument for processing
    the region file instead of the master file.

diff --git a/ChangeLog b/ChangeLog
index dde5951..99973b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-09-01  Tassilo Horn  <address@hidden>
 
+       * tex-buf.el (TeX-command-sequence): Add argument for processing
+       the region file instead of the master file.
+
        * tex.el (TeX--if-macro-fboundp): New portability macro.
        (VirTeX-common-initialization): Use it.
 
diff --git a/tex-buf.el b/tex-buf.el
index a341727..c670fd7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -584,7 +584,7 @@ It is set in `TeX-command-sequence' and used in
 `TeX-command-sequence-sentinel' to call again
 `TeX-command-sequence' with the appropriate command argument.")
 
-(defun TeX-command-sequence (command &optional reset)
+(defun TeX-command-sequence (command &optional reset file-fn)
   "Run a sequence of TeX commands defined by COMMAND.
 
 The COMMAND argument may be
@@ -614,7 +614,12 @@ total in any case.  It ends when `TeX-command-Show' is the
 command to be run.
 
 A non-nil value for the optional argument RESET means this is the
-first run of the function and some variables need to be reset."
+first run of the function and some variables need to be reset.
+
+FILE-FN is a function of zero arguments returning the current
+filename.  Valid choices are `TeX-master-file' (default if
+omitted) and `TeX-region-file'."
+  (setq file-fn (or file-fn #'TeX-master-file))
   (if (null command)
       (message "No command to run.")
     (let (cmd process)
@@ -629,9 +634,9 @@ first run of the function and some variables need to be 
reset."
        (setq cmd (funcall command)
              TeX-command-sequence-command command))
        (t
-       (setq cmd (TeX-command-default (TeX-master-file))
+       (setq cmd (TeX-command-default (funcall file-fn))
              TeX-command-sequence-command t)))
-      (TeX-command cmd 'TeX-master-file 0)
+      (TeX-command cmd file-fn 0)
       (when reset
        (setq TeX-command-sequence-count-same-command 1
              TeX-command-sequence-count 1

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

Summary of changes:
 ChangeLog  |    3 +++
 tex-buf.el |   13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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