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. b9fa19d8bba1889308ec0


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. b9fa19d8bba1889308ec0f94d2f9fba60fdc6968
Date: Mon, 02 Jun 2014 11:00:15 +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  b9fa19d8bba1889308ec0f94d2f9fba60fdc6968 (commit)
      from  87d277dc2b6b3c1e74b0016535270561851fc563 (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 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.

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.

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

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


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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