auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 26f8ce19ea92ef00a8da8


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 26f8ce19ea92ef00a8da872a1ad469ba4bec12b9
Date: Fri, 01 May 2015 08:49:14 +0000

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, master has been updated
       via  26f8ce19ea92ef00a8da872a1ad469ba4bec12b9 (commit)
      from  563f0e68c1d126cbdfd8cb576a0b02ab514e1054 (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 26f8ce19ea92ef00a8da872a1ad469ba4bec12b9
Author: Tassilo Horn <address@hidden>
Date:   Fri May 1 10:44:39 2015 +0200

    Speed up kpsewhich calls by expanding all vars in one call
    
    * tex.el (TeX-tree-expand): Expand all given vars in just one single
    call of kpsewhich.  Users reported that on some windows and mac systems,
    kpsewhich is extremely slow leading to auctex startup times of several
    seconds.

diff --git a/ChangeLog b/ChangeLog
index 3f387e4..dd3dcc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-05-01  Tassilo Horn  <address@hidden>
+
+       * tex.el (TeX-tree-expand): Expand all given vars in just one
+       single call of kpsewhich.  Users reported that on some windows and
+       mac systems, kpsewhich is extremely slow leading to auctex startup
+       times of several seconds.
+
 2015-04-29  Tassilo Horn  <address@hidden>
 
        * tex.el (TeX-string-divide-number-unit): Fix docstring.
diff --git a/tex.el b/tex.el
index b7ffc1f..fb0c9e6 100644
--- a/tex.el
+++ b/tex.el
@@ -640,7 +640,7 @@ overlays between two existing ones.")
 (when (featurep 'xemacs)
 
   (defun TeX-read-string
-    (prompt &optional initial-input history default-value)
+      (prompt &optional initial-input history default-value)
     (condition-case nil
        (read-string prompt initial-input history default-value t)
       (wrong-number-of-arguments
@@ -2356,35 +2356,36 @@ trees.  Only existing directories are returned."
   ;; FIXME: The GNU convention only uses "path" to mean "list of directories"
   ;; and uses "filename" for the name of a file even if it contains possibly
   ;; several elements separated by "/".
-  (let (path-list path exit-status input-dir-list)
-    (condition-case nil
-       (dolist (var vars)
-         (setq path (with-output-to-string
-                      (setq exit-status (call-process
-                                         "kpsewhich"  nil
-                                         (list standard-output nil) nil
-                                         "--progname" program
-                                         "--expand-path" var))))
-         (when (zerop exit-status)
-            (pushnew path path-list :test #'equal)))
-      (error nil))
-    (dolist (elt (nreverse path-list))
-      (let ((separators (if (string-match "^[A-Za-z]:" elt)
+  (let* ((exit-status 1)
+        (path-list (ignore-errors
+                     (with-output-to-string
+                       (setq exit-status
+                             (call-process
+                              "kpsewhich"  nil
+                              (list standard-output nil) nil
+                              "--progname" program
+                              "--expand-path"
+                              (mapconcat #'identity vars
+                                         (if (eq system-type 'windows-nt)
+                                             ";" ":"))))))))
+    (when (zerop exit-status)
+      (let ((separators (if (string-match "^[A-Za-z]:" path-list)
                            "[\n\r;]"
-                         "[\n\r:]")))
+                         "[\n\r:]"))
+           path input-dir-list)
        (dolist (item (condition-case nil
-                         (split-string elt separators t)
+                         (split-string path-list separators t)
                        ;; COMPATIBILITY for XEmacs <= 21.4.15
-                       (error (delete "" (split-string elt separators)))))
+                       (error (delete "" (split-string path-list 
separators)))))
          (if subdirs
              (dolist (subdir subdirs)
                (setq path (file-name-as-directory (concat item subdir)))
                (when (file-exists-p path)
-                  (pushnew path input-dir-list :test #'equal)))
+                 (pushnew path input-dir-list :test #'equal)))
            (setq path (file-name-as-directory item))
            (when (file-exists-p path)
-             (pushnew path input-dir-list :test #'equal))))))
-    (nreverse input-dir-list)))
+             (pushnew path input-dir-list :test #'equal))))
+       (nreverse input-dir-list)))))
 
 (defun TeX-macro-global ()
   "Return directories containing the site's TeX macro and style files."

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

Summary of changes:
 ChangeLog |    7 +++++++
 tex.el    |   43 ++++++++++++++++++++++---------------------
 2 files changed, 29 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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