[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 90/255: moving around major mode and key bindings
From: |
Eric Schulte |
Subject: |
[elpa] 90/255: moving around major mode and key bindings |
Date: |
Sun, 16 Mar 2014 01:02:25 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit 55ce404756ff61970c87ecc569ee88428db2f760
Author: Eric Schulte <address@hidden>
Date: Thu May 24 20:22:48 2012 -0600
moving around major mode and key bindings
---
sgf-board.el | 39 +++++++++++++++++++++++++--------------
1 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/sgf-board.el b/sgf-board.el
index b13196b..09e52ac 100644
--- a/sgf-board.el
+++ b/sgf-board.el
@@ -256,20 +256,6 @@
(interactive "MComment: ")
(message "comment: %S" comment))
-
-;;; Display mode
-(defvar sgf-board-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map (kbd "<right>") 'sgf-board-next)
- (define-key map (kbd "<left>") 'sgf-board-prev)
- (define-key map (kbd "q") (lambda () (interactive)
- (kill-buffer (current-buffer))))
- map)
- "Keymap for `sgf-board-mode'.")
-
-(define-derived-mode sgf-board-mode nil "SGF"
- "Major mode for editing text written for viewing SGF files.")
-
(defun sgf-board-next (&optional count)
(interactive "p")
(dotimes (n (or count 1) (or count 1))
@@ -284,4 +270,29 @@
(pop *history*)
(update-display (current-buffer))))
+(defun sgf-board-mouse-move (ev)
+ (interactive "e")
+ (let ((position (posn-point (event-start ev))))
+ ))
+
+
+;;; Display mode
+(defvar sgf-board-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "m") 'sgf-board-act-move)
+ (define-key map (kbd "r") 'sgf-board-act-resign)
+ (define-key map (kbd "u") 'sgf-board-act-undo)
+ (define-key map (kbd "c") 'sgf-board-act-comment)
+ (define-key map (kbd "n") 'sgf-board-next)
+ (define-key map (kbd "p") 'sgf-board-prev)
+ (define-key map (kbd "<right>") 'sgf-board-next)
+ (define-key map (kbd "<left>") 'sgf-board-prev)
+ (define-key map (kbd "q") (lambda () (interactive)
+ (kill-buffer (current-buffer))))
+ map)
+ "Keymap for `sgf-board-mode'.")
+
+(define-derived-mode sgf-board-mode nil "SGF"
+ "Major mode for editing text written for viewing SGF files.")
+
(provide 'sgf-board)
- [elpa] 77/255: saner requirement dependency graph, (continued)
- [elpa] 77/255: saner requirement dependency graph, Eric Schulte, 2014/03/15
- [elpa] 81/255: normalization, Eric Schulte, 2014/03/15
- [elpa] 80/255: splitting the sgf back end from the board interface, Eric Schulte, 2014/03/15
- [elpa] 84/255: more transition, Eric Schulte, 2014/03/15
- [elpa] 82/255: organization, Eric Schulte, 2014/03/15
- [elpa] 88/255: made the *back-ends* variable singular, Eric Schulte, 2014/03/15
- [elpa] 57/255: splitting sgf.el into board test and utility files, Eric Schulte, 2014/03/15
- [elpa] 87/255: removed old variable, Eric Schulte, 2014/03/15
- [elpa] 83/255: starting to transition to generic board interface, Eric Schulte, 2014/03/15
- [elpa] 85/255: working with new set less some state-leak issues, Eric Schulte, 2014/03/15
- [elpa] 90/255: moving around major mode and key bindings,
Eric Schulte <=
- [elpa] 91/255: adding properties to the board string, Eric Schulte, 2014/03/15
- [elpa] 86/255: playing gnugo, Eric Schulte, 2014/03/15
- [elpa] 94/255: remove old variable from tests, Eric Schulte, 2014/03/15
- [elpa] 92/255: worked around stupid bug in mapconcat, Eric Schulte, 2014/03/15
- [elpa] 93/255: able to play against gnugo, Eric Schulte, 2014/03/15
- [elpa] 95/255: renaming files for go- prefix, Eric Schulte, 2014/03/15
- [elpa] 98/255: *trackers* are multiple subordinate back-ends, Eric Schulte, 2014/03/15
- [elpa] 89/255: tweaks, Eric Schulte, 2014/03/15
- [elpa] 102/255: simpler name for main go-board function, Eric Schulte, 2014/03/15
- [elpa] 100/255: automated playing with gnugo, Eric Schulte, 2014/03/15