[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 280/299: Bugfix in file name expansion.
From: |
Stefan Monnier |
Subject: |
[elpa] 280/299: Bugfix in file name expansion. |
Date: |
Sun, 02 Nov 2014 03:11:58 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
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>
---
ChangeLog | 5 +++++
tex-buf.el | 10 ++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
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)
- [elpa] 256/299: Implement error overview., (continued)
- [elpa] 256/299: Implement error overview., Stefan Monnier, 2014/11/01
- [elpa] 271/299: Keep error overview window if View command is run., Stefan Monnier, 2014/11/01
- [elpa] 275/299: Font-lock fix for verbatim environment args., Stefan Monnier, 2014/11/01
- [elpa] 274/299: Adapt mathtools.el to latest amsmath.el changes., Stefan Monnier, 2014/11/01
- [elpa] 270/299: Manage auto insertion of labels., Stefan Monnier, 2014/11/01
- [elpa] 272/299: Rename LaTeX-auto-insert-label and document its use for sections., Stefan Monnier, 2014/11/01
- [elpa] 277/299: Change Vincent's email address in ChangeLog., Stefan Monnier, 2014/11/01
- [elpa] 268/299: Add customizable option for default date format., Stefan Monnier, 2014/11/01
- [elpa] 273/299: Change again method to determine whether a label should be inserted., Stefan Monnier, 2014/11/01
- [elpa] 266/299: Auto insertion of ampersands., Stefan Monnier, 2014/11/01
- [elpa] 280/299: Bugfix in file name expansion.,
Stefan Monnier <=
- [elpa] 283/299: Document TeX-add-style-hook's new 3rd argument., Stefan Monnier, 2014/11/01
- [elpa] 279/299: Add test for the %` expander., Stefan Monnier, 2014/11/01
- [elpa] 281/299: Remove defalias docstring arg., Stefan Monnier, 2014/11/01
- [elpa] 278/299: Fix the expansion of %' in TeX-expand-list., Stefan Monnier, 2014/11/01
- [elpa] 286/299: Rename LaTeX-amstext-package-option to LaTeX-amstext-package-options., Stefan Monnier, 2014/11/01
- [elpa] 285/299: Use `push-mark' instead of `set-mark'., Stefan Monnier, 2014/11/01
- [elpa] 284/299: Fix \end buffer position passed to hooks., Stefan Monnier, 2014/11/01
- [elpa] 290/299: Fix LaTeX-newline when comment-auto-fill-only-comments is non-nil., Stefan Monnier, 2014/11/01
- [elpa] 287/299: Docstring fix., Stefan Monnier, 2014/11/01
- [elpa] 276/299: Code cleanup and optimizations., Stefan Monnier, 2014/11/01