GNU bug report logs - #30235
[patch] undo-tree byte-compiler warnings

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Alex Branham <alex.branham@HIDDEN>; Keywords: patch; merged with #24354; dated Tue, 23 Jan 2018 23:21:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 24354 30235. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Jan 2018 23:20:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 18:20:04 2018
Received: from localhost ([127.0.0.1]:40125 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ee7rG-0003xp-K1
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 18:20:03 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <alex.branham@HIDDEN>) id 1ee7rD-0003xD-55
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 18:19:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <alex.branham@HIDDEN>) id 1ee7qH-0006ce-Jz
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 18:19:53 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:41768)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <alex.branham@HIDDEN>)
 id 1ee7qH-0006bU-5L
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 18:19:01 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50633)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <alex.branham@HIDDEN>) id 1ee7po-0003ZK-8r
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jan 2018 18:19:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <alex.branham@HIDDEN>) id 1ee7pM-0005LS-2Z
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jan 2018 18:18:32 -0500
Received: from mail-ot0-x22f.google.com ([2607:f8b0:4003:c0f::22f]:37315)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <alex.branham@HIDDEN>)
 id 1ee7pL-0005JU-A9
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jan 2018 18:18:03 -0500
Received: by mail-ot0-x22f.google.com with SMTP id a24so1997168otd.4
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Jan 2018 15:18:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=user-agent:from:to:subject:date:message-id:mime-version;
 bh=/NN6+JyhBmex1sFNegzEWHj47unYrXxERDNR0+MVhaA=;
 b=AG3iwoNvmX6CWhIdivJTiJHH4eIzTjPuc+6KSlxiCbJKO7IWaXjFPfyV1q3ILXfHJB
 LWs1ooFw08JLuP41/boBtF0bghUME9kR1mVpw4uB9BAx8l1rUvy2HygOGTAATSZ7GNpj
 CY50Dx7prvkLzuvJjOh28Lwt5TlixK6cBvGc/G+WB89BggMoqClSSefnk311fM+cnVwA
 ++VCRlEmmXxrMZArUPPQKnkm1xCdPp0nmgMKtLWfa07TbHO+vjFTUYvx8bmt0PN8lmQl
 sZ38n++itY/Jeqbdb1wM+Rthcc66+QzH82zT3++h9YCMNQKdce9XyrYRSPzCTX7SWr6u
 3qSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:user-agent:from:to:subject:date:message-id
 :mime-version;
 bh=/NN6+JyhBmex1sFNegzEWHj47unYrXxERDNR0+MVhaA=;
 b=oU/KkcgeRs1p3yuJEw5yiPn0RASA53VuWzdaLRrp26zQdUOoV2QepISksb6GqPPmTs
 SQj4djqjAJqwRDaCH34qfJXOY6kAHVuIAqlOqTDCZrVtC9qaYDiZQLN31xShL1rmewT9
 5jrvK0QrYEiuDaP2vo+o3lg2EPW1IDmPH2vKt5UWPCSpDMU5RoI40abw8P1h8ft6WLHz
 qWJyDQwE2/i03RS5K1CVzJJhDB4bdMfc6n/uiM27rFgOE41xDpqWZLD5Qv/qjHSvs5kE
 VV44/WIDCP6BzfH0QFhMQ67xZRdBddsy9mFmk22IKP4PNtA+FQpba4Si2E0a21X+LJaV
 thpA==
X-Gm-Message-State: AKwxyteyJWcEEslNejgrTcYDTubOHA12CO2RqsWYQ02mB2GlY0VYIhG3
 psKXHEGWHfu/lanyrM4U4CF5eUzo
X-Google-Smtp-Source: AH8x226R8qtJZ4lf8NBPmEs0bGX4h1lbY+3bRDD1HOOT9axErXoo3eWKRaL9ZdFp4glhCrVRl66bgg==
X-Received: by 10.157.91.22 with SMTP id x22mr8772379oth.206.1516749482083;
 Tue, 23 Jan 2018 15:18:02 -0800 (PST)
Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208])
 by smtp.gmail.com with ESMTPSA id
 s15sm1682270ois.25.2018.01.23.15.18.01 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 23 Jan 2018 15:18:01 -0800 (PST)
User-agent: mu4e 0.9.18; emacs 26.0.91
From: Alex Branham <alex.branham@HIDDEN>
To: "" <bug-gnu-emacs@HIDDEN>
Subject: [patch] undo-tree byte-compiler warnings
Date: Tue, 23 Jan 2018 17:18:00 -0600
Message-ID: <87y3ko9nbr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

I'm not sure if this is the right place to submit patches for ELPA
packages, but I couldn't find anywhere else to go. Let me know if this
should go some place else.

This patch silences several byte compiler warnings, mostly having to do
with unused lexical variables in loops. There are two remaining that I
couldn't figure out how to deal with because I'm not terribly familiar
with the innards of Emacs's undo feature. (Note that the line numbers
are after applying the attached patch):

In undo-tree-pull-undo-in-region-branch:
undo-tree.el:2261:16:Warning: =E2=80=98undo-elt-crosses-region=E2=80=99 is =
an obsolete
    function (as of 25.1).

In undo-tree-pull-redo-in-region-branch:
undo-tree.el:2470:16:Warning: =E2=80=98undo-elt-crosses-region=E2=80=99 is =
an obsolete
    function (as of 25.1).


From f9a275a3cdb586f9ea91e26be84b4a42efe957fc Mon Sep 17 00:00:00 2001
From: Alex Branham <branham@HIDDEN>
Date: Tue, 23 Jan 2018 17:10:48 -0600
Subject: [PATCH] Silence the byte-compiler

---
 undo-tree.el | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index 6c7ee2f..fc52cff 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -757,6 +757,10 @@
 (eval-when-compile (require 'cl))
 (require 'diff)

+;; silence the byte compiler
+(defvar undo-tree-mode)
+(defvar undo-tree-visualizer-selection-mode)
+

 
 ;;; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
@@ -2048,7 +2052,7 @@ which is defined in the `warnings' library.\n")
        ((=3D (mod num-children 2) 1)
         (setq p (undo-tree-node-next node))
         ;; compute left-width
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf lwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2064,7 +2068,7 @@ which is defined in the `warnings' library.\n")
         ;; compute right-width
         (incf rwidth (undo-tree-node-rwidth (car p)))
         (setq p (cdr p))
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf rwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2076,7 +2080,7 @@ which is defined in the `warnings' library.\n")
        (t
         (setq p (undo-tree-node-next node))
         ;; compute left-width
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf lwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2086,7 +2090,7 @@ which is defined in the `warnings' library.\n")
         ;; centre-width is 0 when number of children is even
         (setq cwidth 0)
         ;; compute right-width
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf rwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2748,7 +2752,7 @@ changes within the current region."
     ;; `buffer-undo-tree'
     (undo-list-transfer-to-tree)

-    (dotimes (i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
+    (dotimes (_i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
       ;; check if at top of undo tree
       (unless (undo-tree-node-previous (undo-tree-current buffer-undo-tree=
))
 	(user-error "No further undo information"))
@@ -2857,7 +2861,7 @@ changes within the current region."
     ;; `buffer-undo-tree'
     (undo-list-transfer-to-tree)

-    (dotimes (i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
+    (dotimes (_i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
       ;; check if at bottom of undo tree
       (when (null (undo-tree-node-next (undo-tree-current buffer-undo-tree=
)))
 	(user-error "No further redo information"))
@@ -3576,7 +3580,7 @@ signaling an error if file is not found."
            (car (undo-tree-node-next node)))))
       (move-marker (setq pos (make-marker)) (point))
       (setq n (cons nil (undo-tree-node-next node)))
-      (dotimes (i (/ num-children 2))
+      (dotimes (_i (/ num-children 2))
         (setq n (cdr n))
         (when (or (null active-branch)
                   (eq (car n)
@@ -3629,7 +3633,7 @@ signaling an error if file is not found."
         (move-marker pos (point)))
       ;; right subtrees
       (move-marker trunk-pos (1+ trunk-pos))
-      (dotimes (i (/ num-children 2))
+      (dotimes (_i (/ num-children 2))
         (setq n (cdr n))
         (when (or (null active-branch)
                   (eq (car n)
@@ -3684,7 +3688,7 @@ signaling an error if file is not found."
   (when (characterp str)
     (setq str (make-string arg str))
     (setq arg 1))
-  (dotimes (i arg) (insert str))
+  (dotimes (_i arg) (insert str))
   (setq arg (* arg (length str)))
   (undo-tree-move-forward arg)
   ;; make sure mark isn't active, otherwise `backward-delete-char' might
@@ -3769,7 +3773,7 @@ signaling an error if file is not found."
 	(undo-tree-move-forward
 	 (+ (undo-tree-node-char-rwidth (car n))
 	    (/ undo-tree-visualizer-spacing 2) 1))
-	(dotimes (i (- (/ l 2) p 1))
+	(dotimes (_i (- (/ l 2) p 1))
 	  (setq n (cdr n))
 	  (undo-tree-move-forward
 	   (+ (undo-tree-node-char-lwidth (car n))
@@ -3787,7 +3791,7 @@ signaling an error if file is not found."
 	   (+ (undo-tree-node-char-rwidth (car n))
 	      (/ undo-tree-visualizer-spacing 2) 1))
 	  (setq n (cdr n)))
-	(dotimes (i (- p (/ l 2) (mod l 2)))
+	(dotimes (_i (- p (/ l 2) (mod l 2)))
 	  (undo-tree-move-backward
 	   (+ (undo-tree-node-char-lwidth (car n))
 	      (undo-tree-node-char-rwidth (car n))
@@ -3801,13 +3805,13 @@ signaling an error if file is not found."


 (defun undo-tree-timestamp-to-string
-  (timestamp &optional relative current register)
+    (timestamp &optional relative current register)
   ;; Convert TIMESTAMP to string (either absolute or RELATVE time), indica=
ting
   ;; if it's the CURRENT node and/or has an associated REGISTER.
   (if relative
       ;; relative time
       (let ((time (floor (float-time
-			  (subtract-time (current-time) timestamp))))
+			  (time-subtract (current-time) timestamp))))
 	    n)
 	(setq time
 	      ;; years
@@ -4232,7 +4236,7 @@ specifies `saved', and a negative prefix argument spe=
cifies
     (user-error "Undo-tree mode not enabled in buffer"))
   (let ((node undo-tree-visualizer-selected-node))
     (catch 'top
-      (dotimes (i (or arg 1))
+      (dotimes (_i (or arg 1))
 	(unless (undo-tree-node-previous node) (throw 'top t))
 	(setq node (undo-tree-node-previous node))))
     ;; when using lazy drawing, extend tree upwards as required
@@ -4254,7 +4258,7 @@ specifies `saved', and a negative prefix argument spe=
cifies
     (user-error "Undo-tree mode not enabled in buffer"))
   (let ((node undo-tree-visualizer-selected-node))
     (catch 'bottom
-      (dotimes (i (or arg 1))
+      (dotimes (_i (or arg 1))
 	(unless (nth (undo-tree-node-branch node) (undo-tree-node-next node))
 	  (throw 'bottom t))
 	(setq node
@@ -4281,7 +4285,7 @@ specifies `saved', and a negative prefix argument spe=
cifies
     (goto-char (undo-tree-node-marker undo-tree-visualizer-selected-node))
     (setq end (line-end-position))
     (catch 'end
-      (dotimes (i arg)
+      (dotimes (_i arg)
 	(while (or (null node) (eq node undo-tree-visualizer-selected-node))
 	  (forward-char)
 	  (setq node (get-text-property (point) 'undo-tree-node))
@@ -4304,7 +4308,7 @@ specifies `saved', and a negative prefix argument spe=
cifies
     (goto-char (undo-tree-node-marker undo-tree-visualizer-selected-node))
     (setq beg (line-beginning-position))
     (catch 'beg
-      (dotimes (i arg)
+      (dotimes (_i arg)
 	(while (or (null node) (eq node undo-tree-visualizer-selected-node))
 	  (backward-char)
 	  (setq node (get-text-property (point) 'undo-tree-node))
--
2.16.1




--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Silence-the-byte-compiler.patch

From f9a275a3cdb586f9ea91e26be84b4a42efe957fc Mon Sep 17 00:00:00 2001
From: Alex Branham <branham@HIDDEN>
Date: Tue, 23 Jan 2018 17:10:48 -0600
Subject: [PATCH] Silence the byte-compiler

---
 undo-tree.el | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index 6c7ee2f..fc52cff 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -757,6 +757,10 @@
 (eval-when-compile (require 'cl))
 (require 'diff)
 
+;; silence the byte compiler
+(defvar undo-tree-mode)
+(defvar undo-tree-visualizer-selection-mode)
+
 
 
 ;;; =====================================================================
@@ -2048,7 +2052,7 @@ which is defined in the `warnings' library.\n")
        ((= (mod num-children 2) 1)
         (setq p (undo-tree-node-next node))
         ;; compute left-width
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf lwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2064,7 +2068,7 @@ which is defined in the `warnings' library.\n")
         ;; compute right-width
         (incf rwidth (undo-tree-node-rwidth (car p)))
         (setq p (cdr p))
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf rwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2076,7 +2080,7 @@ which is defined in the `warnings' library.\n")
        (t
         (setq p (undo-tree-node-next node))
         ;; compute left-width
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf lwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2086,7 +2090,7 @@ which is defined in the `warnings' library.\n")
         ;; centre-width is 0 when number of children is even
         (setq cwidth 0)
         ;; compute right-width
-        (dotimes (i (/ num-children 2))
+        (dotimes (_i (/ num-children 2))
           (if (undo-tree-node-lwidth (car p))
               (incf rwidth (+ (undo-tree-node-lwidth (car p))
                               (undo-tree-node-cwidth (car p))
@@ -2748,7 +2752,7 @@ changes within the current region."
     ;; `buffer-undo-tree'
     (undo-list-transfer-to-tree)
 
-    (dotimes (i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
+    (dotimes (_i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
       ;; check if at top of undo tree
       (unless (undo-tree-node-previous (undo-tree-current buffer-undo-tree))
 	(user-error "No further undo information"))
@@ -2857,7 +2861,7 @@ changes within the current region."
     ;; `buffer-undo-tree'
     (undo-list-transfer-to-tree)
 
-    (dotimes (i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
+    (dotimes (_i (or (and (numberp arg) (prefix-numeric-value arg)) 1))
       ;; check if at bottom of undo tree
       (when (null (undo-tree-node-next (undo-tree-current buffer-undo-tree)))
 	(user-error "No further redo information"))
@@ -3576,7 +3580,7 @@ signaling an error if file is not found."
            (car (undo-tree-node-next node)))))
       (move-marker (setq pos (make-marker)) (point))
       (setq n (cons nil (undo-tree-node-next node)))
-      (dotimes (i (/ num-children 2))
+      (dotimes (_i (/ num-children 2))
         (setq n (cdr n))
         (when (or (null active-branch)
                   (eq (car n)
@@ -3629,7 +3633,7 @@ signaling an error if file is not found."
         (move-marker pos (point)))
       ;; right subtrees
       (move-marker trunk-pos (1+ trunk-pos))
-      (dotimes (i (/ num-children 2))
+      (dotimes (_i (/ num-children 2))
         (setq n (cdr n))
         (when (or (null active-branch)
                   (eq (car n)
@@ -3684,7 +3688,7 @@ signaling an error if file is not found."
   (when (characterp str)
     (setq str (make-string arg str))
     (setq arg 1))
-  (dotimes (i arg) (insert str))
+  (dotimes (_i arg) (insert str))
   (setq arg (* arg (length str)))
   (undo-tree-move-forward arg)
   ;; make sure mark isn't active, otherwise `backward-delete-char' might
@@ -3769,7 +3773,7 @@ signaling an error if file is not found."
 	(undo-tree-move-forward
 	 (+ (undo-tree-node-char-rwidth (car n))
 	    (/ undo-tree-visualizer-spacing 2) 1))
-	(dotimes (i (- (/ l 2) p 1))
+	(dotimes (_i (- (/ l 2) p 1))
 	  (setq n (cdr n))
 	  (undo-tree-move-forward
 	   (+ (undo-tree-node-char-lwidth (car n))
@@ -3787,7 +3791,7 @@ signaling an error if file is not found."
 	   (+ (undo-tree-node-char-rwidth (car n))
 	      (/ undo-tree-visualizer-spacing 2) 1))
 	  (setq n (cdr n)))
-	(dotimes (i (- p (/ l 2) (mod l 2)))
+	(dotimes (_i (- p (/ l 2) (mod l 2)))
 	  (undo-tree-move-backward
 	   (+ (undo-tree-node-char-lwidth (car n))
 	      (undo-tree-node-char-rwidth (car n))
@@ -3801,13 +3805,13 @@ signaling an error if file is not found."
 
 
 (defun undo-tree-timestamp-to-string
-  (timestamp &optional relative current register)
+    (timestamp &optional relative current register)
   ;; Convert TIMESTAMP to string (either absolute or RELATVE time), indicating
   ;; if it's the CURRENT node and/or has an associated REGISTER.
   (if relative
       ;; relative time
       (let ((time (floor (float-time
-			  (subtract-time (current-time) timestamp))))
+			  (time-subtract (current-time) timestamp))))
 	    n)
 	(setq time
 	      ;; years
@@ -4232,7 +4236,7 @@ specifies `saved', and a negative prefix argument specifies
     (user-error "Undo-tree mode not enabled in buffer"))
   (let ((node undo-tree-visualizer-selected-node))
     (catch 'top
-      (dotimes (i (or arg 1))
+      (dotimes (_i (or arg 1))
 	(unless (undo-tree-node-previous node) (throw 'top t))
 	(setq node (undo-tree-node-previous node))))
     ;; when using lazy drawing, extend tree upwards as required
@@ -4254,7 +4258,7 @@ specifies `saved', and a negative prefix argument specifies
     (user-error "Undo-tree mode not enabled in buffer"))
   (let ((node undo-tree-visualizer-selected-node))
     (catch 'bottom
-      (dotimes (i (or arg 1))
+      (dotimes (_i (or arg 1))
 	(unless (nth (undo-tree-node-branch node) (undo-tree-node-next node))
 	  (throw 'bottom t))
 	(setq node
@@ -4281,7 +4285,7 @@ specifies `saved', and a negative prefix argument specifies
     (goto-char (undo-tree-node-marker undo-tree-visualizer-selected-node))
     (setq end (line-end-position))
     (catch 'end
-      (dotimes (i arg)
+      (dotimes (_i arg)
 	(while (or (null node) (eq node undo-tree-visualizer-selected-node))
 	  (forward-char)
 	  (setq node (get-text-property (point) 'undo-tree-node))
@@ -4304,7 +4308,7 @@ specifies `saved', and a negative prefix argument specifies
     (goto-char (undo-tree-node-marker undo-tree-visualizer-selected-node))
     (setq beg (line-beginning-position))
     (catch 'beg
-      (dotimes (i arg)
+      (dotimes (_i arg)
 	(while (or (null node) (eq node undo-tree-visualizer-selected-node))
 	  (backward-char)
 	  (setq node (get-text-property (point) 'undo-tree-node))
-- 
2.16.1


--=-=-=--




Acknowledgement sent to Alex Branham <alex.branham@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#30235; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 26 Jan 2018 14:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.