diff --git a/tex-buf.el b/tex-buf.el index e600e63c..dd22712f 100644 --- a/tex-buf.el +++ b/tex-buf.el @@ -494,8 +494,7 @@ been set." ;; of point in the region file so that forward search works. (if (string= name "View") (TeX-region-update-point)) - (let ((TeX-file-fn file-fn) - (command (TeX-command-expand (nth 1 (assoc name TeX-command-list)) + (let ((command (TeX-command-expand (nth 1 (assoc name TeX-command-list)) file-fn)) (hook (nth 2 (assoc name TeX-command-list))) (confirm (if override-confirm @@ -560,9 +559,7 @@ without further expansion." ;; 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 TeX-file-fn (apply-partially - #'TeX--master-or-region-file-with-extra-quotes - file)) + (setq TeX-file-fn #'TeX--master-or-region-file-with-extra-quotes) (while (setq TeX-expand-pos (string-match pat TeX-expand-command TeX-expand-pos)) (setq string (match-string 0 TeX-expand-command) entry (assoc string list) @@ -587,7 +584,7 @@ without further expansion." TeX-expand-command)) (defun TeX--master-or-region-file-with-extra-quotes - (file-fn &optional extension nondirectory ask extra) + (&optional extension nondirectory ask extra) "Return file name with quote for shell. Helper function of `TeX-command-expand'. @@ -609,7 +606,7 @@ conditions are met: 2. \" \\input\" is supplemented 3. EXTRA is non-nil (default when expanding \"%T\")" (shell-quote-argument - (let* ((raw (funcall file-fn extension nondirectory ask)) + (let* ((raw (TeX-active-master 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)