[Top][All Lists]

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

[elpa] 02/03: [gnugo int] Simplify COND expression.

From: Thien-Thi Nguyen
Subject: [elpa] 02/03: [gnugo int] Simplify COND expression.
Date: Sat, 03 May 2014 12:46:37 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 78ea982ff8fd1ad84056a14fc0ed563a796ceafe
Author: Thien-Thi Nguyen <address@hidden>
Date:   Sat May 3 10:10:19 2014 +0200

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

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 4de6931..4e8c275 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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]