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

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

[elpa] 05/05: [gnugo frolic] Add backward/forward branch navigation comm


From: Thien-Thi Nguyen
Subject: [elpa] 05/05: [gnugo frolic] Add backward/forward branch navigation commands.
Date: Tue, 08 Apr 2014 10:38:25 +0000

ttn pushed a commit to branch master
in repository elpa.

commit bbdff36738924013a6e278f694935d9d84e8b8d6
Author: Thien-Thi Nguyen <address@hidden>
Date:   Tue Apr 8 12:39:00 2014 +0200

    [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’.
---
 packages/gnugo/gnugo.el |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 5364aa5..592fbc7 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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]