[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 04/04: [gnugo frolic] Add command to navigate to end of branch.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 04/04: [gnugo frolic] Add command to navigate to end of branch. |
Date: |
Sat, 03 May 2014 05:57:39 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit be1352f01eba817bcccea0a308075edddf492009
Author: Thien-Thi Nguyen <address@hidden>
Date: Sat May 3 07:56:28 2014 +0200
[gnugo frolic] Add command to navigate to end of branch.
* packages/gnugo/gnugo.el (gnugo-frolic-tip-move): New command.
(gnugo-frolic-mode-map): Add binding for ‘t’.
---
packages/gnugo/gnugo.el | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 990ee48..dab2c17 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1248,6 +1248,17 @@ This fails if the monkey is on the current branch
(interactive "p")
(gnugo--vertical n 1))
+(defun gnugo-frolic-tip-move ()
+ "Move to the tip of the current branch."
+ (interactive)
+ (gnugo--awakened ((omit line bidx monkey width)
+ require-valid-branch)
+ (goto-char (point-max))
+ (let ((mnum (gnugo--tree-mnum tree))
+ (node (car (aref ends a))))
+ (re-search-backward (format "^%3d" (gethash node mnum)))
+ (gnugo--move-to-bcol a))))
+
(defun gnugo-boss-is-near ()
"Do `bury-buffer' until the current one is not a GNU Board."
(interactive)
@@ -2703,6 +2714,7 @@ See `gnugo-board-mode' for a full list of commands."
("\C-f" . gnugo-frolic-forward-branch)
("\C-p" . gnugo-frolic-previous-move)
("\C-n" . gnugo-frolic-next-move)
+ ("t" . gnugo-frolic-tip-move)
("j" . gnugo-frolic-exchange-left)
("J" . gnugo-frolic-rotate-left)
("k" . gnugo-frolic-exchange-right)