[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 05/06: [gnugo] New command: ‘ A’ (gnugo-switch-to-another)
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 05/06: [gnugo] New command: ‘ A’ (gnugo-switch-to-another) |
Date: |
Sat, 22 Feb 2014 12:52:31 +0000 |
ttn pushed a commit to branch ttn-gnugo
in repository elpa.
commit 3610bd0aae549c2541ccf1ff029c580e05433997
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] branch ttn-gnugo updated (95bf8e2 -> 1f3d9d6), Thien-Thi Nguyen, 2014/02/22
- [elpa] 02/06: [gnugo int] Use internal macros more., Thien-Thi Nguyen, 2014/02/22
- [elpa] 03/06: [gnugo maint] Update HACKING; nfc., Thien-Thi Nguyen, 2014/02/22
- [elpa] 06/06: [gnugo] New command: ‘ _’ and ‘M-_’ (gnugo-boss-is-near), Thien-Thi Nguyen, 2014/02/22
- [elpa] 04/06: [gnugo] Bind ‘DEL’ t o ‘gnugo-undo-two-moves’., Thien-Thi Nguyen, 2014/02/22
- [elpa] 01/06: [gnugo] Make proc-status change mode-line elem more informative., Thien-Thi Nguyen, 2014/02/22
- [elpa] 05/06: [gnugo] New command: ‘ A’ (gnugo-switch-to-another),
Thien-Thi Nguyen <=