auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 22


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 220ab9ed1b45a4fe3298874af68e71cff2d7c6a5
Date: Fri, 4 Sep 2020 16:53:05 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, lexical-binding-attempt-1 has been updated
       via  220ab9ed1b45a4fe3298874af68e71cff2d7c6a5 (commit)
      from  ef6418d4dce589a63f66851e741e267d9f3b0693 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 220ab9ed1b45a4fe3298874af68e71cff2d7c6a5
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Fri Sep 4 22:52:08 2020 +0200

    Pick up Al Haji-Ali's hint for not abusing dyn `file' in evince/pdf-tools 
viewer

diff --git a/tex-buf.el b/tex-buf.el
index b43b77d..54671ef 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -463,10 +463,10 @@ Do you want to select one of these engines? "
   :group 'TeX-command
   :type 'integer)
 
-(defun TeX-command (name file &optional override-confirm)
-  "Run command NAME on the file returned by calling FILE.
+(defun TeX-command (name file-fn &optional override-confirm)
+  "Run command NAME on the file returned by calling FILE-FN.
 
-FILE is the symbol of a function returning a file name.  The
+FILE-FN is the symbol of a function returning a file name.  The
 function has one optional argument, the extension to use on the
 file.
 
@@ -485,19 +485,18 @@ been set."
   ;; because preview-latex calls `TeX-run-command' directly.
   (setq-default TeX-command-buffer (current-buffer))
 
-  (cond ((eq file #'TeX-region-file)
+  (cond ((eq file-fn #'TeX-region-file)
         (setq TeX-current-process-region-p t))
-       ((eq file #'TeX-master-file)
+       ((eq file-fn #'TeX-master-file)
         (setq TeX-current-process-region-p nil)))
 
   ;; When we're operating on a region, we need to update the position
   ;; of point in the region file so that forward search works.
   (if (string= name "View") (TeX-region-update-point))
 
-  (let ((TeX-file-fn file)
-        (TeX-file (when (functionp file) (funcall file)))
+  (let ((TeX-file-fn file-fn)
         (command (TeX-command-expand (nth 1 (assoc name TeX-command-list))
-                                    file))
+                                    file-fn))
        (hook (nth 2 (assoc name TeX-command-list)))
        (confirm (if override-confirm
                     (> (prefix-numeric-value override-confirm) 0)
@@ -533,8 +532,9 @@ remember to add /Library/TeX/texbin/ to your PATH"
                          ""))))
 
     ;; Now start the process
-    (TeX-process-set-variable TeX-file 'TeX-command-next TeX-command-Show)
-    (funcall hook name command TeX-file)))
+    (let ((file (funcall file-fn)))
+      (TeX-process-set-variable file 'TeX-command-next TeX-command-Show)
+      (funcall hook name command file))))
 
 (defvar TeX-command-text)               ;Dynamically scoped.
 (defvar TeX-command-pos)                ;Dynamically scoped.
diff --git a/tex.el b/tex.el
index 97af769..fd4f2da 100644
--- a/tex.el
+++ b/tex.el
@@ -519,9 +519,6 @@ string."
   "Dynamically bound by `TeX-command'.
 Usually, either `TeX-master-file', `TeX-region-file', or
 `TeX-active-master'.")
-(defvar TeX-file nil
-  "Dynamically bound by `TeX-command'.
-Result of funcalling `TeX-file-fn'.")
 
 (defvar TeX-expand-list-builtin
   '(("%q" (lambda ()
@@ -1246,7 +1243,7 @@ entry in `TeX-view-program-list-builtin'."
                                 (get-file-buffer (TeX-region-file t)))
                               (current-buffer))
        (pdf-sync-forward-search))
-    (let ((pdf (concat TeX-file "." (TeX-output-extension))))
+    (let ((pdf (TeX-active-master (TeX-output-extension))))
       (pop-to-buffer (or (find-buffer-visiting pdf)
                         (find-file-noselect pdf))))))
 
@@ -1271,7 +1268,7 @@ viewer."
   (let* ((uri (concat "file://"
                       (url-encode-url
                       (expand-file-name
-                       (concat TeX-file "." (TeX-output-extension))))))
+                       (TeX-active-master (TeX-output-extension))))))
         (owner (dbus-call-method
                 :session (format "org.%s.%s.Daemon" de app)
                 (format "/org/%s/%s/Daemon" de app)

-----------------------------------------------------------------------

Summary of changes:
 tex-buf.el | 20 ++++++++++----------
 tex.el     |  7 ++-----
 2 files changed, 12 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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