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

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

[elpa] 01/01: [gnugo int] Replace COND expression w/ IF.


From: Thien-Thi Nguyen
Subject: [elpa] 01/01: [gnugo int] Replace COND expression w/ IF.
Date: Fri, 09 May 2014 06:43:28 +0000

ttn pushed a commit to branch master
in repository elpa.

commit e882729c54d3ae570105a2604d8bc8ad01a09c13
Author: Thien-Thi Nguyen <address@hidden>
Date:   Fri May 9 08:35:12 2014 +0200

    [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.
---
 packages/gnugo/gnugo.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

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