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. 3ac59294abc7ad686e878


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3ac59294abc7ad686e8788e5b2c12f78489240f7
Date: Mon, 25 Aug 2014 07:03:40 +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  3ac59294abc7ad686e8788e5b2c12f78489240f7 (commit)
      from  f01ae735d5e11c3f64ce46aba5788cd537a55845 (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 3ac59294abc7ad686e8788e5b2c12f78489240f7
Author: Florent Rougon <address@hidden>
Date:   Mon Aug 25 09:02:55 2014 +0200

    Bugfix in file name expansion.
    
    * tex-buf.el (TeX-command-expand): Fix possible endless loop in
    file name expansion.
    
    Signed-off-by: Tassilo Horn <address@hidden>

diff --git a/ChangeLog b/ChangeLog
index 4bb50da..01ff6dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-25  Florent Rougon  <address@hidden>  (tiny change)
+
+       * tex-buf.el (TeX-command-expand): Fix possible endless loop in
+       file name expansion.
+
 2014-08-24  Mosè Giordano  <address@hidden>
 
        * tests/tex/command-expansion.el: New test file.
diff --git a/tex-buf.el b/tex-buf.el
index ea62e11..a3538ba 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -387,7 +387,7 @@ without further expansion."
                  (concat (and (stringp TeX-command-pos) TeX-command-pos)
                          (apply ',file args)
                          (and (stringp TeX-command-pos) TeX-command-pos)))))
-       case-fold-search string expansion arguments)
+        expansion-res case-fold-search string expansion arguments)
     (setq list (cons
                (list "%%" (lambda nil
                             (setq pos (1+ pos))
@@ -410,7 +410,13 @@ without further expansion."
                                 (TeX-function-p expansion))
                            (apply expansion arguments))
                           ((boundp expansion)
-                           (apply (eval expansion) arguments))
+                            (setq expansion-res
+                                  (apply (eval expansion) arguments))
+                            (when (eq expansion 'file)
+                              ;; Advance past the file name in order to
+                              ;; prevent expanding any substring of it.
+                              (setq pos (+ pos (length expansion-res))))
+                              expansion-res)
                           (t
                            (error "Nonexpansion %s" expansion)))))
       (if (stringp string)

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

Summary of changes:
 ChangeLog  |    5 +++++
 tex-buf.el |   10 ++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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