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

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

[elpa] 01/02: [gnugo int] Use ‘setq ’ less.


From: Thien-Thi Nguyen
Subject: [elpa] 01/02: [gnugo int] Use ‘setq ’ less.
Date: Tue, 18 Mar 2014 10:42:55 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 6b12e6c8117429b6ea1b50418409c8e07ddf23c5
Author: Thien-Thi Nguyen <address@hidden>
Date:   Tue Mar 18 11:26:21 2014 +0100

    [gnugo int] Use ‘setq’ less.
    
    * packages/gnugo/gnugo.el (gnugo-board-mode): ...here.
---
 packages/gnugo/gnugo.el |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index d92eea5..a332864 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1692,12 +1692,12 @@ In this mode, keys do not self insert.
   (switch-to-buffer (generate-new-buffer "(Uninitialized GNUGO Board)"))
   (buffer-disable-undo)                 ; todo: undo undo undoing
   (kill-all-local-variables)
-  (setq truncate-lines t)
   (use-local-map gnugo-board-mode-map)
   (set (make-local-variable 'font-lock-defaults)
        '(gnugo-font-lock-keywords t))
-  (setq major-mode 'gnugo-board-mode)
-  (setq mode-name "GNUGO Board")
+  (setq major-mode 'gnugo-board-mode
+        mode-name "GNUGO Board"
+        truncate-lines t)
   (add-hook 'kill-buffer-hook 'gnugo-cleanup nil t)
   (set (make-local-variable 'gnugo-state)
        (make-hash-table :size (1- 42) :test 'eq))
@@ -1732,7 +1732,6 @@ In this mode, keys do not self insert.
         (args (read-string "GNU Go options: "
                            (car gnugo-option-history)
                            'gnugo-option-history))
-        (rules "Japanese")
         proc
         board-size user-color handicap komi minus-l infile)
     (dolist (x '((board-size      19 "--boardsize")
@@ -1750,8 +1749,6 @@ In this mode, keys do not self insert.
                      (if rx s (string-to-number s))))
                  default))))
     (gnugo-put :user-color user-color)
-    (when (string-match "--chinese-rules" args)
-      (setq rules "Chinese"))
     (let ((proc-args (split-string args)))
       (gnugo-put :proc-args proc-args)
       (gnugo-put :proc (setq proc (apply 'start-process "gnugo"
@@ -1784,7 +1781,9 @@ In this mode, keys do not self insert.
       (mapc (lambda (x) (apply 'gnugo-note x))
             `((:SZ ,board-size)
               (:DT ,(format-time-string "%Y-%m-%d"))
-              (:RU ,rules)
+              (:RU ,(if (string-match "--chinese-rules" args)
+                        "Chinese"
+                      "Japanese"))
               (:AP ("gnugo.el" . ,gnugo-version))
               (:KM ,komi)
               (,(if g-blackp :PW :PB) ,(user-full-name))



reply via email to

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