[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 252/299: Fix possible infinite loop in TeX-parse-all-errors.
From: |
Stefan Monnier |
Subject: |
[elpa] 252/299: Fix possible infinite loop in TeX-parse-all-errors. |
Date: |
Sun, 02 Nov 2014 03:11:48 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit b9fa19d8bba1889308ec0f94d2f9fba60fdc6968
Author: Mosè Giordano <address@hidden>
Date: Mon Jun 2 12:58:17 2014 +0200
Fix possible infinite loop in TeX-parse-all-errors.
* tex-buf.el (TeX-warning): Preserve point when searching backward. In
some cases this prevents infinite loops in `TeX-parse-all-errors' and
fixes wrong detection of context string.
---
ChangeLog | 3 +++
tex-buf.el | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e8a16bf..109025e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@
(TeX-error-description-help): Ditto.
(TeX-help-error): Add new `type' argument. Color help messages
using the new faces.
+ (TeX-warning): Preserve point when searching backward. In some
+ cases this prevents infinite loops in `TeX-parse-all-errors' and
+ fixes wrong detection of context string.
2014-05-27 Mos� Giordano <address@hidden>
diff --git a/tex-buf.el b/tex-buf.el
index 614f156..790feee 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1798,8 +1798,8 @@ warning."
(word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
"`\\(\\w+\\)'"))
- ;; Get error-line (warning)
- (line (when (re-search-backward line-string nil t)
+ ;; Get error-line (warning).
+ (line (when (save-excursion (re-search-backward line-string nil t))
(string-to-number (TeX-match-buffer 1))))
(line-end (if bad-box (string-to-number (TeX-match-buffer 2))
line))
@@ -1821,7 +1821,8 @@ warning."
(error-point (point))
;; Now find the error word.
- (string (when (re-search-backward word-string context-start t)
+ (string (when (save-excursion
+ (re-search-backward word-string context-start t))
(TeX-match-buffer 1)))
;; We might use these in another file.
- [elpa] 242/299: Add another exception to error parsing., (continued)
- [elpa] 242/299: Add another exception to error parsing., Stefan Monnier, 2014/11/01
- [elpa] 241/299: Resolve conflicts, Stefan Monnier, 2014/11/01
- [elpa] 243/299: Fix fontification of optional argument to verbatim environments., Stefan Monnier, 2014/11/01
- [elpa] 238/299: Use LaTeX-biblatex-use-Biber to manually select bibliography processor., Stefan Monnier, 2014/11/01
- [elpa] 246/299: Make style/babel.el file non-executable., Stefan Monnier, 2014/11/01
- [elpa] 234/299: Ask for TeX-master if unknown., Stefan Monnier, 2014/11/01
- [elpa] 244/299: Fix typo in listings.el., Stefan Monnier, 2014/11/01
- [elpa] 237/299: Update biblatex support in style file., Stefan Monnier, 2014/11/01
- [elpa] 250/299: Add TeX-previous-error to Command menu., Stefan Monnier, 2014/11/01
- [elpa] 247/299: Convert font-latex-fontify-sectioning to float when used as a number., Stefan Monnier, 2014/11/01
- [elpa] 252/299: Fix possible infinite loop in TeX-parse-all-errors.,
Stefan Monnier <=
- [elpa] 249/299: Backport from ELPA repository., Stefan Monnier, 2014/11/01
- [elpa] 245/299: Use TeX-esc as completion separator for units in siunitx.el., Stefan Monnier, 2014/11/01
- [elpa] 253/299: Cater for bad boxes in error descriptions., Stefan Monnier, 2014/11/01
- [elpa] 257/299: Fix TeX-find-display-help., Stefan Monnier, 2014/11/01
- [elpa] 251/299: Color TeX Help buffer., Stefan Monnier, 2014/11/01
- [elpa] 255/299: Better check for mgs., Stefan Monnier, 2014/11/01
- [elpa] 258/299: Prettify file names in error overview., Stefan Monnier, 2014/11/01
- [elpa] 259/299: Update Future Development section in manual., Stefan Monnier, 2014/11/01
- [elpa] 254/299: Simplify error finding and help displaying functions., Stefan Monnier, 2014/11/01
- [elpa] 263/299: Fix remaining XEmacs compilation issues., Stefan Monnier, 2014/11/01