]> git.eshelyaron.com Git - emacs.git/commitdiff
(gomoku-click): New function.
authorRichard M. Stallman <rms@gnu.org>
Sat, 19 Nov 1994 14:52:57 +0000 (14:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 19 Nov 1994 14:52:57 +0000 (14:52 +0000)
(gomoku-mode-map): Put it on Mouse-2.

lisp/play/gomoku.el

index 314a7de45928b09570efd47b0d1147baaf95d440..5bb0f110fef49a95d8b9b140bc5586f6d2f6f7df 100644 (file)
   (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.