[Top][All Lists]

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. fac521dc9e057a1fec039

From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. fac521dc9e057a1fec03954bdca37ed505549c75
Date: Thu, 19 Nov 2015 00:09:23 +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  fac521dc9e057a1fec03954bdca37ed505549c75 (commit)
      from  43cbc5f73e42f72a3bb0816a4ab07f66a7ba93c8 (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 fac521dc9e057a1fec03954bdca37ed505549c75
Author: Mosè Giordano <address@hidden>
Date:   Thu Nov 19 01:04:07 2015 +0100

    Fix bug in TeX-command-sequence
    * tex-buf.el (TeX-command-sequence): Ask for TeX-master if unknown,
    otherwise running this function on a file without a known `TeX-master'
    will result in `TeX-master' being automatically set to "<none>" at some
    (TeX-region-file): Add a third compatibility argument and update
    docstring accordingly.

diff --git a/tex-buf.el b/tex-buf.el
index bc19f7d..1dd7587 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -680,8 +680,12 @@ omitted) and `TeX-region-file'."
        (setq cmd (TeX-command-default
                   ;; File function should be called with nil `nondirectory'
                   ;; argument, otherwise `TeX-command-sequence' won't work in
-                  ;; included files not placed in `TeX-master-directory'.
-                  (funcall TeX-command-sequence-file-function))
+                  ;; included files not placed in `TeX-master-directory'.  In
+                  ;; addition, `TeX-master-file' is called with the third
+                  ;; argument (`ask') set to t, so that the master file is
+                  ;; properly set.  This is also what `TeX-command-master'
+                  ;; does.
+                  (funcall TeX-command-sequence-file-function nil nil t))
              TeX-command-sequence-command t)))
       (TeX-command cmd TeX-command-sequence-file-function 0)
       (when reset
@@ -1987,10 +1991,16 @@ original file."
            (set-buffer-modified-p nil)
          (save-buffer 0))))))
-(defun TeX-region-file (&optional extension nondirectory)
+(defun TeX-region-file (&optional extension nondirectory _ignore)
   "Return TeX-region file name with EXTENSION.
 If optional second argument NONDIRECTORY is non-nil, do not include
-the directory."
+the directory.
+The compatibility argument IGNORE is ignored."
+  ;; The third argument `_ignore' is kept for symmetry with `TeX-master-file's
+  ;; third argument `ask'.  For example, it's used in `TeX-command-sequence',
+  ;; where we don't know which function has to be called.  Keep this in mind
+  ;; should you want to use another argument here.
   (concat (if nondirectory "" (TeX-master-directory))
          (cond ((eq extension t)
                 (concat TeX-region "." TeX-default-extension))


Summary of changes:
 tex-buf.el |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)


reply via email to

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