emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] elpa e4b2e6a 24/35: Make TeX-previous-error go backward


From: Tassilo Horn
Subject: [elpa] elpa e4b2e6a 24/35: Make TeX-previous-error go backward
Date: Thu, 1 Sep 2016 15:57:50 +0000 (UTC)

branch: elpa
commit e4b2e6a76965156257a19bd65f9bc76dfb743b6e
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Make TeX-previous-error go backward
    
    * tex-buf.el (TeX-parse-TeX): Decrease `TeX-error-last-visited' when
      `arg' is negative.  This fixes the behavior of `TeX-previous-error'.
---
 tex-buf.el |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 431c011..575c1ed 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2319,7 +2319,10 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
            ;; `TeX-suppress-ignored-warnings' is non-nil and there are ignore
            ;; warnings.
            (while (null (zerop arg))
-             (setq TeX-error-last-visited (1+ TeX-error-last-visited)
+             (setq TeX-error-last-visited
+                   ;; Increase or decrese `TeX-error-last-visited' depending on
+                   ;; the sign of `arg'.
+                   (+ (signum arg) TeX-error-last-visited)
                    item (if (natnump TeX-error-last-visited)
                             (nth TeX-error-last-visited TeX-error-list)
                           ;; XEmacs doesn't support `nth' with a negative 
index.
@@ -2327,9 +2330,7 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
              ;; Increase or decrease `arg' only if the warning isn't to be
              ;; skipped.
              (unless (TeX-error-list-skip-warning-p (nth 0 item) (nth 10 item))
-               (setq arg (if (> arg 0)
-                             (1- arg)
-                           (1+ arg)))))
+               (setq arg (- arg (signum arg)))))
            (if (< TeX-error-last-visited -1)
                (setq TeX-error-last-visited -1))
            (cond ((or (null item)



reply via email to

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