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

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

[elpa] externals/gnugo c6795aa 140/357: [gnugo frolic int] Assign ‘pop’


From: Stefan Monnier
Subject: [elpa] externals/gnugo c6795aa 140/357: [gnugo frolic int] Assign ‘pop’ rv to avoid byte-compiler warning.
Date: Sun, 29 Nov 2020 14:51:07 -0500 (EST)

branch: externals/gnugo
commit c6795aa60e0d2cbfed6380d9c6efed26fe028be7
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo frolic int] Assign ‘pop’ rv to avoid byte-compiler warning.
    
    * packages/gnugo/gnugo.el (gnugo-frolic-prune-branch):
    ...here; also, let ‘pop’ handle ‘(zerop a)’ case internally.
---
 gnugo.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index ea37ef1..f74c489 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1027,10 +1027,9 @@ This fails if the monkey is on the current branch
    (setq line (save-excursion
                 (when (re-search-backward "^ *[0-9]+ [BW]" nil t)
                   (match-string 0))))
-   (let ((new (append ends nil)))
-     (if (zerop a)
-         (pop new)
-       (pop (nthcdr a new)))
+   (let* ((new (append ends nil))
+          ;; Gratuitous ‘pop’ rv assignment avoids byte-compiler warning.
+          (bye (pop (nthcdr a new))))
      (gnugo--set-tree-ends tree (apply 'vector new)))
    (when (< a bidx)
      (aset monkey 1 (decf bidx)))



reply via email to

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