diff options
| author | Richard M. Stallman | 1994-11-19 14:52:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-11-19 14:52:57 +0000 |
| commit | 65091471be2bf598c3719a828ddf61e57b5b1b45 (patch) | |
| tree | 8e21219150c0d706298fc7c8934acda796487deb | |
| parent | b59f6d7a689c5a4bc703918aca0a67b1492aea32 (diff) | |
| download | emacs-65091471be2bf598c3719a828ddf61e57b5b1b45.tar.gz emacs-65091471be2bf598c3719a828ddf61e57b5b1b45.zip | |
(gomoku-click): New function.
(gomoku-mode-map): Put it on Mouse-2.
| -rw-r--r-- | lisp/play/gomoku.el | 7 |
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 @@ | |||
| 113 | (define-key gomoku-mode-map [left] 'gomoku-move-left) | 113 | (define-key gomoku-mode-map [left] 'gomoku-move-left) |
| 114 | (define-key gomoku-mode-map [right] 'gomoku-move-right) | 114 | (define-key gomoku-mode-map [right] 'gomoku-move-right) |
| 115 | (define-key gomoku-mode-map [kp-enter] 'gomoku-human-plays) | 115 | (define-key gomoku-mode-map [kp-enter] 'gomoku-human-plays) |
| 116 | (define-key gomoku-mode-map [mouse-2] 'gomoku-click) | ||
| 116 | (define-key gomoku-mode-map [insert] 'gomoku-human-plays)) | 117 | (define-key gomoku-mode-map [insert] 'gomoku-human-plays)) |
| 117 | 118 | ||
| 118 | (defun gomoku-mode () | 119 | (defun gomoku-mode () |
| @@ -737,6 +738,12 @@ Use \\[describe-mode] for more info." | |||
| 737 | (t | 738 | (t |
| 738 | (gomoku-prompt-for-move))))))))) | 739 | (gomoku-prompt-for-move))))))))) |
| 739 | 740 | ||
| 741 | (defun gomoku-click (click) | ||
| 742 | "Play at the square where you click." | ||
| 743 | (interactive "e") | ||
| 744 | (mouse-set-point click) | ||
| 745 | (gomoku-human-plays)) | ||
| 746 | |||
| 740 | (defun gomoku-human-plays () | 747 | (defun gomoku-human-plays () |
| 741 | "Signal to the Gomoku program that you have played. | 748 | "Signal to the Gomoku program that you have played. |
| 742 | You must have put the cursor on the square where you want to play. | 749 | You must have put the cursor on the square where you want to play. |