summaryrefslogtreecommitdiff
path: root/lisp/play
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-11-19 14:52:57 +0000
committerRichard M. Stallman <rms@gnu.org>1994-11-19 14:52:57 +0000
commitced530642546f7684293e958602e6c4bd5c6b4af (patch)
treee8fdae8c089271ffceae3de3b0c982d97cbe1102 /lisp/play
parent9aaba4f843221ebb1bdf826f0e388e4a7b46a901 (diff)
downloademacs-ced530642546f7684293e958602e6c4bd5c6b4af.tar.gz
(gomoku-click): New function.
(gomoku-mode-map): Put it on Mouse-2.
Diffstat (limited to 'lisp/play')
-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 314a7de4592..5bb0f110fef 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.