[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa fac521d 05/35: Fix bug in TeX-command-sequence
From: |
Tassilo Horn |
Subject: |
[elpa] elpa fac521d 05/35: Fix bug in TeX-command-sequence |
Date: |
Sun, 31 Jan 2016 16:05:33 +0000 |
branch: elpa
commit fac521dc9e057a1fec03954bdca37ed505549c75
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
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
point.
(TeX-region-file): Add a third compatibility argument and update
docstring accordingly.
---
tex-buf.el | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
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))
- [elpa] branch elpa created (now 0a99c11), Tassilo Horn, 2016/01/31
- [elpa] elpa 43cbc5f 04/35: Remove support to "Master:" line, Tassilo Horn, 2016/01/31
- [elpa] elpa e4cde66 02/35: Determine AUCTEXDATE and AUCTEXVERSION from git, Tassilo Horn, 2016/01/31
- [elpa] elpa c2fbb9c 01/35: Fix error in autogen.sh, configure, and Makefile, Tassilo Horn, 2016/01/31
- [elpa] elpa fac521d 05/35: Fix bug in TeX-command-sequence,
Tassilo Horn <=
- [elpa] elpa 4ed66ee 03/35: Activate RefTeX reference styles, Tassilo Horn, 2016/01/31
- [elpa] elpa 8334cde 08/35: ; Fix a typo in header, Tassilo Horn, 2016/01/31
- [elpa] elpa 065b1e8 09/35: Improve style/amsthm.el, Tassilo Horn, 2016/01/31
- [elpa] elpa 68d9b03 07/35: Rename TeX-after-TeX-LaTeX-command-finished-hook, Tassilo Horn, 2016/01/31
- [elpa] elpa 2880b62 13/35: Fix regex in texmathp, Tassilo Horn, 2016/01/31
- [elpa] elpa 63ea223 06/35: Convert Elisp source files to UTF-8, Tassilo Horn, 2016/01/31
- [elpa] elpa 5940550 10/35: Add new style/theorem.el, Tassilo Horn, 2016/01/31
- [elpa] elpa 15ebec9 12/35: Rename TeX-after-compilation-finished-hook to -functions, Tassilo Horn, 2016/01/31
- [elpa] elpa 23612ac 15/35: Delete .cvsignore, Tassilo Horn, 2016/01/31
- [elpa] elpa 8cd9b0d 14/35: Fix query prompt, Tassilo Horn, 2016/01/31