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

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

[elpa] externals/gnugo da98bc8 288/357: [gnugo int] Replace COND express


From: Stefan Monnier
Subject: [elpa] externals/gnugo da98bc8 288/357: [gnugo int] Replace COND expression w/ IF.
Date: Sun, 29 Nov 2020 14:51:41 -0500 (EST)

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

    [gnugo int] Replace COND expression w/ IF.
    
    Incidentally, this reduces the byte code from 19 to 14 insn.
    
    * packages/gnugo/gnugo.el (gnugo-fancy-undo):
    ...here, replacing last two clauses w/ ‘car-safe’ expression.
---
 gnugo.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index e67c29c..ebdfb85 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -2329,8 +2329,9 @@ Otherwise, undo repeatedly up to and including the move
 which placed the stone at point."
   (interactive "P")
   (gnugo--climb-towards-root
-   (cond ((numberp count) count)
-         ((consp count) (car count)))))
+   (if (numberp count)
+       count
+     (car-safe count))))
 
 (define-minor-mode gnugo-image-display-mode
   "If enabled, display the board using images.



reply via email to

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