[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))
- [elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history from file when reverting buffer., (continued)
- [elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history from file when reverting buffer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0273ec 144/195: Make undo-tree-visualizer-[undo|redo]-to-x work in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0e8793 145/195: Fix diff after undo-tree-visualize-[undo|redo]-to-x in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7d12602 150/195: Fix formatting bug in absolute timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 01b4a86 151/195: Update comment about Emacs version required for persistent history., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8105f5f 143/195: Temporarily disable diff wto speed up undoing-to-x., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree aabc832 147/195: Remove unused variable., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4cba00b 163/195: Fix one of the diagrams in the Commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3a772b7 170/195: Bump copyright year and version number., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bf3a146 167/195: Disable undo-in-region by default., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree eec9edd 168/195: Silence some unused variable compiler warnings.,
Stefan Monnier <=
- [elpa] externals/undo-tree 77c29a6 171/195: Factor out canary checking into undo-list-found-canary-p., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4a72a1e 172/195: Change undo-list-pop-changeset to macro taking buffer-undo-list argument., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c39882f 177/195: Prevent misleading message about discarded undo history on first undo., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e6f31a0 179/195: Use custom undo-[strong-|outer]-limit values in undo-tree-mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 2ac4eac 181/195: Improve messages displayed to user when undo history is discarded., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 6a428ce 182/195: Bump copyright year in readiness for new release., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7fb46cb 183/195: Fix copy-undo-tree by forcing vector rather than native defstruct., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5011f91 186/195: Implement non-recursive undo-tree copier, to avoid hitting Elisp and c stack space limits., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 0161041 194/195: Fix argument order in gv setter definitions., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bf2e9ba 195/195: Print complete objects when saving undo-tree history, Stefan Monnier, 2020/11/28