[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex ff688b9 33/80: Stop depreciated usage of undecla
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex ff688b9 33/80: Stop depreciated usage of undeclared dynamic variable |
Date: |
Wed, 16 Oct 2019 11:07:12 -0400 (EDT) |
branch: externals/auctex
commit ff688b98e8837387ca5a22f8ff2d57f8bf8fffcd
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Stop depreciated usage of undeclared dynamic variable
* tex-buf.el (TeX--master-or-region-file-with-extra-quotes): Redefine
as template. On accepting one of `TeX-master-file', `TeX-region-file'
or `TeX-active-master' as its first argument, it becomes a wrapper for
those three, like previous definition.
(TeX-command-expand): Arrage in accord with the above change.
With these two changes, we no longer need implicit dynamic binding of
non-special variable `orig-file'.
* tex.el (TeX-expand-list-builtin): Update supplementary comment for
"%T".
---
tex-buf.el | 53 +++++++++++++++++++++++++++++++++++++----------------
tex.el | 5 +++--
2 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/tex-buf.el b/tex-buf.el
index e89df51..0849198 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1,6 +1,6 @@
;;; tex-buf.el --- External commands for AUCTeX.
-;; Copyright (C) 1991-1999, 2001-2018 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1999, 2001-2019 Free Software Foundation, Inc.
;; Maintainer: address@hidden
;; Keywords: tex, wp
@@ -547,8 +547,6 @@ without further expansion."
(let (pat
pos ;;FIXME: Should this be dynamically scoped?
entry TeX-command-text TeX-command-pos
- (orig-file file)
- (file #'TeX--master-or-region-file-with-extra-quotes)
expansion-res case-fold-search string expansion arguments)
(setq list (cons
(list "%%" (lambda nil
@@ -572,6 +570,24 @@ without further expansion."
(functionp expansion))
(apply expansion arguments))
((boundp expansion)
+ (if (eq expansion 'file)
+ ;; `TeX-command-expand' is called with
+ ;; `file' argument being one of
+ ;; `TeX-master-file',
+ ;; `TeX-region-file' and
+ ;; `TeX-active-master'. The return
+ ;; value of these functions sometimes
+ ;; needs suitable "decorations" for an
+ ;; argument for underlying shell or
+ ;; latex executable, or both, when the
+ ;; relavant file name involves some
+ ;; special characters such as space
+ ;; and multibyte characters. Hence
+ ;; embed that function in a template
+ ;; prepared for that purpose.
+ (setq file (apply-partially
+
#'TeX--master-or-region-file-with-extra-quotes
+ file)))
(setq expansion-res
(apply (symbol-value expansion) arguments))
(when (eq expansion 'file)
@@ -587,24 +603,29 @@ without further expansion."
command)
(defun TeX--master-or-region-file-with-extra-quotes
- (&optional extension nondirectory ask extra)
+ (file-fn &optional extension nondirectory ask extra)
"Return file name with quote for 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.)
-Enclose the file name within \\detokenize{} when the following three
+Helper function of `TeX-command-expand'.
+
+This is a kind of template. How to use:
+Fix, by `apply-partially', the first argument FILE-FN as one of
+the three functions `TeX-master-file', `TeX-region-file' or
+`TeX-active-master'. Then the result is just a wrapper for that
+function suitable in `TeX-command-expand'.
+
+As a wrapper described above, it passes EXTENSION, NONDIRECTORY
+and ASK to the \"bare\" function as-is, and arranges the returned
+file name for use with command shell. I.e. it encloses the file
+name with space within quotes `\"' first when \" \\input\" is
+supplemented (indicated by dynamically binded variable
+`TeX-command-text' having string value.) It also encloses the
+file name within \\detokenize{} when the following three
conditions are met:
1. compiling with standard (pdf)LaTeX or upLaTeX
2. \" \\input\" is supplemented
-3. EXTRA is non-nil. (default when expanding \"%T\")"
+3. EXTRA is non-nil (default when expanding \"%T\")"
(shell-quote-argument
- (let* ((raw (funcall orig-file extension nondirectory ask))
+ (let* ((raw (funcall file-fn extension nondirectory ask))
;; String `TeX-command-text' means that the file name is
;; given through \input command.
(quote-for-space (if (and (stringp TeX-command-text)
diff --git a/tex.el b/tex.el
index 684b6f7..0fda0d5 100644
--- a/tex.el
+++ b/tex.el
@@ -555,8 +555,9 @@ string."
(concat TeX-command-text " \"\\input\""))
"")))
;; The fourth argument of t is actually for wrapper function
- ;; `TeX--master-or-region-file-with-extra-quotes', temporally set
- ;; as value of `file' in `TeX-command-expand'.
+ ;; provided by `TeX--master-or-region-file-with-extra-quotes'.
+ ;; See its doc string as well as the comments in
+ ;; `TeX-command-expand'.
("%T" file t t nil t)
("%n" TeX-current-line)
("%d" file "dvi" t)
- [elpa] externals/auctex 9127647 69/80: Update style/varioref.el to package version 1.6b, (continued)
- [elpa] externals/auctex 9127647 69/80: Update style/varioref.el to package version 1.6b, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex eafb114 75/80: Fix preview-latex for TeXLive 2019 update, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex cdb98c6 34/80: Fix last commit, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 0fd9848 35/80: Improve style/mflogo.el, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 1b88eda 38/80: Fix autoload generation code (bug#35758), Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 90fcbd4 41/80: Make navigation function robust, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex c07e4bf 49/80: Update style/AnonymousPro.el to package version 2.2, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex a9b5eb1 67/80: ; * style/changelog.el (font-latex-add-keywords): Silence the compiler., Tassilo Horn, 2019/10/16
- [elpa] externals/auctex dc5e90e 66/80: Add new style/multitoc.el, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex c5e47f8 80/80: ; Recompile using GNUMakefile after merge from origin/master, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex ff688b9 33/80: Stop depreciated usage of undeclared dynamic variable,
Tassilo Horn <=
- [elpa] externals/auctex 3e179f8 53/80: Update style/fvextra.el to package version 1.4, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 3542a23 70/80: Update style/subcaption.el to package version 1.3, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 7cb6c19 59/80: Fix lisp example for `TeX-electric-math', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex a033c30 43/80: ; Use `LaTeX-extract-key-value-label', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex aa17420 46/80: ; Silence the compiler, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 01dc048 78/80: Change default for new Ghostscript, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 799c844 63/80: Add new style/changelog.el, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex dc2c2d6 65/80: Make "PDF Tools" viewer available under Windows and macOS, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex dbc1fa0 71/80: Support new kernel macros \Ref and \labelformat, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 7cd329f 74/80: Add fontification support for ragged2e macros, Tassilo Horn, 2019/10/16