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

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

[elpa] externals/gnugo dfc130d 136/357: [gnugo frolic] Add backward/forw


From: Stefan Monnier
Subject: [elpa] externals/gnugo dfc130d 136/357: [gnugo frolic] Add backward/forward branch navigation commands.
Date: Sun, 29 Nov 2020 14:51:06 -0500 (EST)

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

    [gnugo frolic] Add backward/forward branch navigation commands.
    
    * packages/gnugo/gnugo.el (gnugo-frolic-backward-branch)
    (gnugo-frolic-forward-branch): New commands.
    (gnugo-frolic-mode-map): Add bindings for ‘C-b’, ‘C-f’.
---
 gnugo.el | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnugo.el b/gnugo.el
index 5364aa5..592fbc7 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -997,6 +997,18 @@ are dimmed.  Type \\[describe-mode] in that buffer for 
details."
   (interactive)
   (gnugo--swiz 1))
 
+(defun gnugo-frolic-backward-branch (&optional n)
+  "Move backward N (default 1) branches."
+  (interactive "p")
+  (gnugo--awakened
+   (move-to-column (+ 10 (* 6 (mod (- a n) width))))))
+
+(defun gnugo-frolic-forward-branch (&optional n)
+  "Move forward N (default 1) branches."
+  (interactive "p")
+  (gnugo--awakened
+   (move-to-column (+ 10 (* 6 (mod (+ a n) width))))))
+
 (defun gnugo-boss-is-near ()
   "Do `bury-buffer' until the current one is not a GNU Board."
   (interactive)
@@ -2253,6 +2265,8 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
         (define-key gnugo-frolic-mode-map (car pair) (cdr pair)))
       '(("q"          . gnugo-frolic-quit)
         ("C"          . gnugo-frolic-quit) ; like ‘View-kill-and-leave’
+        ("\C-b"       . gnugo-frolic-backward-branch)
+        ("\C-f"       . gnugo-frolic-forward-branch)
         ("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]