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

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

[elpa] elpa 9e627fc 02/16: Do not use a function from cl


From: Tassilo Horn
Subject: [elpa] elpa 9e627fc 02/16: Do not use a function from cl
Date: Fri, 14 Oct 2016 16:03:32 +0000 (UTC)

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

    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

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