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

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

[elpa] 03/05: [gnugo int] Add abstraction: gnugo--no-worries


From: Thien-Thi Nguyen
Subject: [elpa] 03/05: [gnugo int] Add abstraction: gnugo--no-worries
Date: Thu, 24 Apr 2014 18:02:19 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 7d8f45619d427935a56eb1976e25cb65b3ece327
Author: Thien-Thi Nguyen <address@hidden>
Date:   Thu Apr 24 14:41:41 2014 +0200

    [gnugo int] Add abstraction: gnugo--no-worries
    
    * packages/gnugo/gnugo.el (gnugo--no-worries): New defsubst.
    (gnugo--q/ue): Use ‘gnugo--no-worries’.
---
 packages/gnugo/gnugo.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 7fdfaaf..24adb49 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -421,9 +421,12 @@ status of the command.  See also `gnugo-query'."
     (prog1 (substring (process-get proc :srs) 0 -2)
       (process-put proc :srs ""))))
 
+(defsubst gnugo--no-worries (string)
+  (= ?= (aref string 0)))
+
 (defun gnugo--q/ue (fmt &rest args)
   (let ((ans (apply 'gnugo--q fmt args)))
-    (unless (= ?= (aref ans 0))
+    (unless (gnugo--no-worries ans)
       (user-error "%s" ans))
     (substring ans 2)))
 



reply via email to

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