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

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

[elpa] externals/undo-tree eec9edd 168/195: Silence some unused variable


From: Stefan Monnier
Subject: [elpa] externals/undo-tree eec9edd 168/195: Silence some unused variable compiler warnings.
Date: Sat, 28 Nov 2020 13:41:46 -0500 (EST)

branch: externals/undo-tree
commit eec9eddc80673f8fe854392c6deb4f7174e004ef
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>

    Silence some unused variable compiler warnings.
---
 undo-tree.el | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index 9723542..a434f61 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -2048,7 +2048,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 (_ (/ 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 +2064,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 (_ (/ 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 +2076,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 (_ (/ 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 +2086,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 (_ (/ 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 +2748,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 (_ (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 +2857,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 (_ (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"))
@@ -3577,7 +3577,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 (_ (/ num-children 2))
         (setq n (cdr n))
         (when (or (null active-branch)
                   (eq (car n)
@@ -3630,7 +3630,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 (_ (/ num-children 2))
         (setq n (cdr n))
         (when (or (null active-branch)
                   (eq (car n)
@@ -3685,7 +3685,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 (_ arg) (insert str))
   (setq arg (* arg (length str)))
   (undo-tree-move-forward arg)
   ;; make sure mark isn't active, otherwise `backward-delete-char' might
@@ -3770,7 +3770,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 (_ (- (/ l 2) p 1))
          (setq n (cdr n))
          (undo-tree-move-forward
           (+ (undo-tree-node-char-lwidth (car n))
@@ -3788,7 +3788,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 (_ (- p (/ l 2) (mod l 2)))
          (undo-tree-move-backward
           (+ (undo-tree-node-char-lwidth (car n))
              (undo-tree-node-char-rwidth (car n))
@@ -4233,7 +4233,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 (_ (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
@@ -4255,7 +4255,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 (_ (or arg 1))
        (unless (nth (undo-tree-node-branch node) (undo-tree-node-next node))
          (throw 'bottom t))
        (setq node
@@ -4282,7 +4282,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 (_ arg)
        (while (or (null node) (eq node undo-tree-visualizer-selected-node))
          (forward-char)
          (setq node (get-text-property (point) 'undo-tree-node))
@@ -4305,7 +4305,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 (_ arg)
        (while (or (null node) (eq node undo-tree-visualizer-selected-node))
          (backward-char)
          (setq node (get-text-property (point) 'undo-tree-node))



reply via email to

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