branch: elpa
commit 9e627fc8d7b744dd5342cf3e0e76de67fa0eb9be
Author: Mosè Giordano <m...@gnu.org>
Commit: Mosè Giordano <m...@gnu.org>

    Do not use a function from cl
    
    * tex-buf.el (TeX-parse-TeX): Do not use the `signum' function, provided
      by `cl' library.
---
 tex-buf.el |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 575c1ed..cf2ec78 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2321,8 +2321,11 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
            (while (null (zerop arg))
              (setq TeX-error-last-visited
                    ;; Increase or decrese `TeX-error-last-visited' depending on
-                   ;; the sign of `arg'.
-                   (+ (signum arg) TeX-error-last-visited)
+                   ;; the sign of `arg'.  Note: `signum' is a function from
+                   ;; `cl' library, do not be tempted to use it.
+                   (if (> arg 0)
+                       (1+ TeX-error-last-visited)
+                     (1- 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.
@@ -2330,7 +2333,11 @@ 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 (- arg (signum arg)))))
+               ;; Note: `signum' is a function from `cl' library, do not be
+               ;; tempted to use it.
+               (setq arg (if (> arg 0)
+                             (1- arg)
+                           (1+ arg)))))
            (if (< TeX-error-last-visited -1)
                (setq TeX-error-last-visited -1))
            (cond ((or (null item)

Reply via email to