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

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

[elpa] externals/gnugo b6ac4ac 283/357: [gnugo frolic] Add command to na


From: Stefan Monnier
Subject: [elpa] externals/gnugo b6ac4ac 283/357: [gnugo frolic] Add command to navigate to end of branch.
Date: Sun, 29 Nov 2020 14:51:40 -0500 (EST)

branch: externals/gnugo
commit b6ac4ac87606b42356041e545b28b3b0c6d21837
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [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’.
---
 gnugo.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnugo.el b/gnugo.el
index 990ee48..dab2c17 100644
--- a/gnugo.el
+++ b/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)



reply via email to

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