[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 31ee142 38/48: Fix regression of `TeX-view'
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 31ee142 38/48: Fix regression of `TeX-view' |
Date: |
Sun, 16 Sep 2018 01:47:26 -0400 (EDT) |
branch: externals/auctex
commit 31ee142567534235f0e8b354fb23d5f4244b4770
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Fix regression of `TeX-view'
* tex-buf.el (TeX-active-master): Add dummy argument for
compatibility. In `TeX-view', `TeX-commmand' is called with
`TeX-active-master', so the `file' argument is `TeX-active-master'
in subsequent call of `TeX-command-expand'. In that case,
`TeX--master-or-region-file-with-extra-quotes' calls
`TeX-active-master' with three arguments.
(TeX--master-or-region-file-with-extra-quotes): Adapt doc string.
* tex.el (TeX-expand-list-builtin): Adapt comment.
* tests/tex/command-expansion.el (TeX-command-expand-active-master):
New test.
---
tests/tex/command-expansion.el | 13 +++++++++++++
tex-buf.el | 24 ++++++++++++++++--------
tex.el | 2 +-
3 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el
index 14e425d..dd1f09b 100644
--- a/tests/tex/command-expansion.el
+++ b/tests/tex/command-expansion.el
@@ -126,4 +126,17 @@ See
<https://lists.gnu.org/r/bug-auctex/2014-08/msg00012.html>."
;; (TeX-master-file "pdf" t)))
))
+(ert-deftest TeX-command-expand-active-master ()
+ "Test whether `TeX-active-master' is valid argument for
`TeX-command-expand'."
+ (let ((TeX-master "abc")
+ TeX-current-process-region-p)
+ (setq TeX-current-process-region-p nil)
+ (should (string=
+ (TeX-command-expand "%s" #'TeX-active-master)
+ TeX-master))
+ (setq TeX-current-process-region-p t)
+ (should (string=
+ (TeX-command-expand "%s" #'TeX-active-master)
+ TeX-region))))
+
;;; command-expansion.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 49f9645..cc35938 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -584,12 +584,12 @@ without further expansion."
(defun TeX--master-or-region-file-with-extra-quotes
(&optional extension nondirectory ask extra)
"Return file name with quote for shell.
-Wrapper for `TeX-master-file' or `TeX-region-file' to be used in
-`TeX-command-expand'.
-It is assumed that `orig-file' has dynamic binding of the value of
-`TeX-master-file' or `TeX-region-file'. Pass EXTENSION, NONDIRECTORY
-and ASK to that function as-is, and arrange the returned file name for
-use with command shell.
+Wrapper for `TeX-master-file', `TeX-region-file' or
+`TeX-active-master' to be used in `TeX-command-expand'.
+It is assumed that `orig-file' has dynamic binding of the value
+of `TeX-master-file', `TeX-region-file' or `TeX-active-master'.
+Pass EXTENSION, NONDIRECTORY and ASK to that function as-is, and
+arrange the returned file name for use with command shell.
Enclose the file name with space within quotes `\"' first when
\" \\input\" is supplemented (indicated by dynamically binded
variable `TeX-command-text' having string value.)
@@ -2024,14 +2024,22 @@ command."
(with-current-buffer TeX-command-buffer
(TeX-process-buffer (TeX-active-master)))))
-(defun TeX-active-master (&optional extension nondirectory)
+(defun TeX-active-master (&optional extension nondirectory _ignore)
"The master file currently being compiled.
If optional argument EXTENSION is non-nil, add that file extension to
the name. Special value t means use `TeX-default-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--master-or-region-file-with-extra-quotes', where we don't
+ ;; know which function has to be called. Keep this in mind should
+ ;; you want to use another argument here.
+ ;; See also the similar comment in `TeX-region-file'.
(if TeX-current-process-region-p
(TeX-region-file extension nondirectory)
(TeX-master-file extension nondirectory)))
diff --git a/tex.el b/tex.el
index 68a7942..9995af3 100644
--- a/tex.el
+++ b/tex.el
@@ -495,7 +495,7 @@ string."
(or (if TeX-source-correlate-output-page-function
(funcall TeX-source-correlate-output-page-function))
"1")))
- ;; `file' means to call `TeX-master-file' or `TeX-region-file'
+ ;; `file' means to call `TeX-master-file', `TeX-region-file' or
`TeX-active-master'
("%s" file nil t)
("%t" file t t)
;; If any TeX codes appear in the interval between %` and %', move
- [elpa] externals/auctex 1fef01c 45/48: Update style/lettrine.el to package version 2.01, (continued)
- [elpa] externals/auctex 1fef01c 45/48: Update style/lettrine.el to package version 2.01, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex cff843b 17/48: Remove obsolete option related to Japanese TeX, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex a59c754 35/48: Adjust test for known emacs bug, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 0d5c1c0 41/48: ; Fix last commit and push missing Makefile.in., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 45747b9 42/48: Add \eqref to RefTeX's reference styles, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex a8ea127 29/48: Accept non-ascii file name in accord with change in TL 2018, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 48325a7 20/48: Update URLs further, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 8d30dc1 37/48: Add new style/marginnote.el, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 5df288d 44/48: ; Remove unwanted spaces., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex a7cde09 47/48: Update style/lettrine.el to package version 2.21, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 31ee142 38/48: Fix regression of `TeX-view',
Tassilo Horn <=
- [elpa] externals/auctex 80bcd0a 46/48: Update style/lettrine.el to package version 2.1, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 168a4a1 19/48: Update URLs, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex c3cf39e 34/48: Make preamble caching robust to LuaLaTeX and (u)pLaTeX, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 03ba1fa 43/48: Add new style/ocg-p.el and style/ocgx.el, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex f761ab4 48/48: Merge branch 'master' into externals/auctex, Tassilo Horn, 2018/09/16