branch: externals/auctex
commit 842471c3f51bdb787825452753acdc68d0627a13
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>

    Give proper argument to `TeX-command-expand'
    
    * preview.el.in (TeX-inline-preview-internal): Give `TeX-region-file'
    or `TeX-master-file' as `file' argument of `TeX-command-expand' when
    preamble caching is enabled.  This argument used to be nil, which
    caused error when lualatex is in use.  The fourth element of the
    `luatex' entry of `TeX-engine-alist-builtin' contains "%s", which
    eventually triggers the use of the `file' argument.
---
 preview.el.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/preview.el.in b/preview.el.in
index 6685341..f0c1288 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3554,7 +3554,10 @@ internal parameters, STR may be a log to insert into the 
current log."
                        ;; (TeX-engine-alist) are dropped, give them
                        ;; back.
                        (list (list "\\`\\([^ ]+\\)"
-                                   (TeX-command-expand "%(PDF)%(latex)" 
nil)))))
+                                   (TeX-command-expand "%(PDF)%(latex)"
+                                                       (if 
TeX-current-process-region-p
+                                                           #'TeX-region-file
+                                                         
#'TeX-master-file))))))
             command) file))))
     (condition-case err
        (progn

Reply via email to