emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex cdb98c6 34/80: Fix last commit


From: Tassilo Horn
Subject: [elpa] externals/auctex cdb98c6 34/80: Fix last commit
Date: Wed, 16 Oct 2019 11:07:12 -0400 (EDT)

branch: externals/auctex
commit cdb98c69f2ac5787b00cdd6647b4bf54f63da2b4
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Fix last commit
    
    * tex-buf.el (TeX-command-expand): Redefine the value of `file' just
    once per call of `TeX-command-expand'.  Previous code could give
    spurious quote when the given command string contains more than one
    "%" expanders tied with the symbol `file'.
---
 tex-buf.el | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 0849198..8b87c4c 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -554,6 +554,17 @@ without further expansion."
                             "%"))
                (or list (TeX-expand-list)))
          pat (regexp-opt (mapcar #'car list)))
+    ;; `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))
     (while (setq pos (string-match pat command pos))
       (setq string (match-string 0 command)
            entry (assoc string list)
@@ -570,24 +581,6 @@ 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)



reply via email to

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