[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 06/06: [gnugo] New command: ‘ _’ and ‘M-_’ (gnugo-boss-is-near)
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 06/06: [gnugo] New command: ‘ _’ and ‘M-_’ (gnugo-boss-is-near) |
Date: |
Sat, 22 Feb 2014 12:52:31 +0000 |
ttn pushed a commit to branch ttn-gnugo
in repository elpa.
commit 1f3d9d6340fba14a83e99a4ff141be4def2f8efe
Author: Thien-Thi Nguyen <address@hidden>
Date: Sat Feb 22 11:00:38 2014 +0100
[gnugo] New command: ‘_’ and ‘M-_’ (gnugo-boss-is-near)
* packages/gnugo/gnugo.el (gnugo-boss-is-near): New command.
(gnugo-board-mode-map): Bind ‘_’ and ‘M-_’ to it.
---
packages/gnugo/gnugo.el | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 7fc1e23..dc646ef 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -652,6 +652,12 @@ For all other values of RSEL, do nothing and return nil."
((eq 'cadr rsel) (next nil) (car (next nil)))
((eq 'count rsel) (aref (gnugo-get :monkey) 2))))))
+(defun gnugo-boss-is-near ()
+ "Do `bury-buffer' until the current one is not a GNU Board."
+ (interactive)
+ (while (gnugo-board-buffer-p)
+ (bury-buffer)))
+
(defun gnugo-note (property value &optional movep mogrifyp)
(when mogrifyp
(let ((sz (gnugo-treeroot :SZ)))
@@ -1824,8 +1830,8 @@ starting a new one. See `gnugo-board-mode' documentation
for more info."
("u" . gnugo-undo-two-moves)
("\C-?" . gnugo-undo-two-moves)
("\C-l" . gnugo-refresh)
- ("\M-_" . bury-buffer)
- ("_" . bury-buffer)
+ ("\M-_" . gnugo-boss-is-near)
+ ("_" . gnugo-boss-is-near)
("h" . gnugo-move-history)
("i" . gnugo-toggle-image-display-command)
("w" . gnugo-worm-stones)
- [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 <=
- [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, 2014/02/22