[Top][All Lists]

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

[elpa] externals/gnugo 46eec46 285/357: [gnugo int] Simplify COND expres

From: Stefan Monnier
Subject: [elpa] externals/gnugo 46eec46 285/357: [gnugo int] Simplify COND expression.
Date: Sun, 29 Nov 2020 14:51:40 -0500 (EST)

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

    [gnugo int] Simplify COND expression.
    * packages/gnugo/gnugo.el (gnugo-yy):
    Check ‘symbolp’ first; avoid ‘consp’ and ‘and’ altogether.
 gnugo.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 4de6931..4e8c275 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -516,9 +516,9 @@ when you are sure the command cannot fail."
 (defun gnugo-yy (yin yang &optional momentaryp)
   (gnugo-f (format "%d-%s"
-                   yin (cond ((and (consp yang) momentaryp) (cdr yang))
-                             ((consp yang) (car yang))
-                             (t yang)))))
+                   yin (cond ((symbolp yang) yang)
+                             (momentaryp (cdr yang))
+                             (t (car yang))))))
 (defun gnugo-toggle-image-display ()
   (unless (display-images-p)

reply via email to

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