[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 45/51: [gnugo] New command: ‘ A’ (gnugo-switch-to-another)
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 45/51: [gnugo] New command: ‘ A’ (gnugo-switch-to-another) |
Date: |
Mon, 24 Feb 2014 12:30:27 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 84a3eb00552530a1b2d5a6dbc1206081e4728b7c
Author: Thien-Thi Nguyen <address@hidden>
Date: Fri Feb 21 12:47:18 2014 +0100
[gnugo] New command: ‘A’ (gnugo-switch-to-another)
* packages/gnugo/gnugo.el
(gnugo-switch-to-another): New command.
(gnugo-board-mode-map): Bind ‘A’ to it.
---
packages/gnugo/gnugo.el | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index b30988c..7fc1e23 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1554,6 +1554,15 @@ which placed the stone at point."
(interactive)
(message "%s" (gnugo-position)))
+(defun gnugo-switch-to-another ()
+ "Switch to another GNU Go game buffer (if any)."
+ (interactive)
+ (let ((cur (current-buffer)))
+ (switch-to-buffer (cl-find-if 'gnugo-board-buffer-p
+ (reverse (buffer-list))))
+ (when (eq cur (current-buffer))
+ (message "(only one)"))))
+
;;;---------------------------------------------------------------------------
;;; Command properties and gnugo-command
@@ -1834,6 +1843,7 @@ starting a new one. See `gnugo-board-mode' documentation
for more info."
("\C-x\C-w" . gnugo-write-sgf-file)
("l" . gnugo-read-sgf-file)
("F" . gnugo-display-final-score)
+ ("A" . gnugo-switch-to-another)
;; mouse
([(down-mouse-1)] . gnugo-mouse-move)
([(down-mouse-2)] . gnugo-mouse-move) ; mitigate accidents
- [elpa] 26/51: [gnugo] Give names and docstr ings to ‘lambda’ commands., (continued)
- [elpa] 26/51: [gnugo] Give names and docstr ings to ‘lambda’ commands., Thien-Thi Nguyen, 2014/02/24
- [elpa] 38/51: [gnugo] Fix bug: Relax sync regexp., Thien-Thi Nguyen, 2014/02/24
- [elpa] 39/51: [gnugo] Don't show underscore in group-animation message., Thien-Thi Nguyen, 2014/02/24
- [elpa] 36/51: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl., Thien-Thi Nguyen, 2014/02/24
- [elpa] 37/51: [gnugo maint] Update "next" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 32/51: [gnugo] Use ‘user-erro r’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 02/51: Import gnugo.el from ttn-pers-elisp 1.59., Thien-Thi Nguyen, 2014/02/24
- [elpa] 40/51: [gnugo] Use special constructs for keybindings in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 21/51: [gnugo gtp int] Use :post-thunk instead of :post-hook., Thien-Thi Nguyen, 2014/02/24
- [elpa] 31/51: [gnugo int] Add abstraction: gnugo--unclose-game, Thien-Thi Nguyen, 2014/02/24
- [elpa] 45/51: [gnugo] New command: ‘ A’ (gnugo-switch-to-another),
Thien-Thi Nguyen <=
- [elpa] 42/51: [gnugo int] Use internal macros more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 46/51: [gnugo] New command: ‘ _’ and ‘M-_’ (gnugo-boss-is-near), Thien-Thi Nguyen, 2014/02/24
- [elpa] 43/51: [gnugo maint] Update HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 50/51: [gnugo maint] Update NEWS, HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 41/51: [gnugo] Make proc-status change mode-line elem more informative., Thien-Thi Nguyen, 2014/02/24
- [elpa] 47/51: [gnugo maint] Update NEWS; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 48/51: [gnugo] Fix bug: Compute grid spacing using offset math., Thien-Thi Nguyen, 2014/02/24
- [elpa] 49/51: [gnugo] Rename var to ‘gnugo-inhibit-refresh’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 51/51: [gnugo] Release: 2.3.0, Thien-Thi Nguyen, 2014/02/24
- [elpa] 44/51: [gnugo] Bind ‘DEL’ t o ‘gnugo-undo-two-moves’., Thien-Thi Nguyen, 2014/02/24