[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/03: [gnugo int] Decruft: Don't stash :proc-args.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/03: [gnugo int] Decruft: Don't stash :proc-args. |
Date: |
Sat, 19 Apr 2014 14:57:29 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit f45cdf43e8e4e62197ac15f8854aa5df203da02b
Author: Thien-Thi Nguyen <address@hidden>
Date: Fri Apr 18 11:50:14 2014 +0200
[gnugo int] Decruft: Don't stash :proc-args.
* packages/gnugo/gnugo.el (gnugo): ...here.
---
packages/gnugo/gnugo.el | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index b1de724..c74244c 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -2435,11 +2435,15 @@ starting a new one. See `gnugo-board-mode'
documentation for more info."
;; set up a new board
(switch-to-buffer (generate-new-buffer "(Uninitialized GNUGO Board)"))
(gnugo-board-mode)
- (let ((args (read-string "GNU Go options: "
- (car gnugo-option-history)
- 'gnugo-option-history))
- proc
- board-size user-color handicap komi minus-l infile)
+ (let* ((args (read-string "GNU Go options: "
+ (car gnugo-option-history)
+ 'gnugo-option-history))
+ (proc (apply 'start-process "gnugo"
+ (current-buffer)
+ gnugo-program
+ "--mode" "gtp" "--quiet"
+ (split-string args)))
+ board-size user-color handicap komi minus-l infile)
(loop for (var default opt rx)
in '((board-size 19 "--boardsize")
(user-color "black" "--color" "\\(black\\|white\\)")
@@ -2455,13 +2459,7 @@ starting a new one. See `gnugo-board-mode'
documentation for more info."
(if rx s (string-to-number s))))
default)))
(gnugo-put :user-color user-color)
- (let ((proc-args (split-string args)))
- (gnugo-put :proc-args proc-args)
- (gnugo-put :proc (setq proc (apply 'start-process "gnugo"
- (current-buffer)
- gnugo-program
- "--mode" "gtp" "--quiet"
- proc-args))))
+ (gnugo-put :proc proc)
(set-process-sentinel proc 'gnugo-sentinel)
;; Emacs is too protective sometimes, blech.
(set-process-query-on-exit-flag proc nil)