aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-11-19 14:52:57 +0000
committerRichard M. Stallman <[email protected]>1994-11-19 14:52:57 +0000
commit65091471be2bf598c3719a828ddf61e57b5b1b45 (patch)
tree8e21219150c0d706298fc7c8934acda796487deb /lisp
parentb59f6d7a689c5a4bc703918aca0a67b1492aea32 (diff)
(gomoku-click): New function.
(gomoku-mode-map): Put it on Mouse-2.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/play/gomoku.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 314a7de459..5bb0f110fe 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -113,6 +113,7 @@
(define-key gomoku-mode-map [left] 'gomoku-move-left)
(define-key gomoku-mode-map [right] 'gomoku-move-right)
(define-key gomoku-mode-map [kp-enter] 'gomoku-human-plays)
+ (define-key gomoku-mode-map [mouse-2] 'gomoku-click)
(define-key gomoku-mode-map [insert] 'gomoku-human-plays))
(defun gomoku-mode ()
@@ -737,6 +738,12 @@ Use \\[describe-mode] for more info."
(t
(gomoku-prompt-for-move)))))))))
+(defun gomoku-click (click)
+ "Play at the square where you click."
+ (interactive "e")
+ (mouse-set-point click)
+ (gomoku-human-plays))
+
(defun gomoku-human-plays ()
"Signal to the Gomoku program that you have played.
You must have put the cursor on the square where you want to play.