ttn pushed a commit to branch master
in repository elpa.

commit 7d8f45619d427935a56eb1976e25cb65b3ece327
Author: Thien-Thi Nguyen <t...@gnu.org>
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