diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-02-19 06:51:49 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-02-19 06:51:49 +0100 |
commit | 73a6ab0a1b5c0f9620b439e13998a08f8214a334 (patch) | |
tree | c8b23661f16d53de184682adc21f7a119f293e95 | |
parent | 928b643a28919e927af3aba8f8b420e098eb45c4 (diff) | |
download | emacs-73a6ab0a1b5c0f9620b439e13998a08f8214a334.tar.gz |
Do interactive mode tagging for snake.el
-rw-r--r-- | lisp/play/snake.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/play/snake.el b/lisp/play/snake.el index bed7cea6ee5..29effa23460 100644 --- a/lisp/play/snake.el +++ b/lisp/play/snake.el @@ -336,38 +336,38 @@ Argument SNAKE-BUFFER is the name of the buffer." (defun snake-move-left () "Make the snake move left." - (interactive) + (interactive nil snake-mode) (when (zerop (snake-final-x-velocity)) (push '(-1 0) snake-velocity-queue))) (defun snake-move-right () "Make the snake move right." - (interactive) + (interactive nil snake-mode) (when (zerop (snake-final-x-velocity)) (push '(1 0) snake-velocity-queue))) (defun snake-move-up () "Make the snake move up." - (interactive) + (interactive nil snake-mode) (when (zerop (snake-final-y-velocity)) (push '(0 -1) snake-velocity-queue))) (defun snake-move-down () "Make the snake move down." - (interactive) + (interactive nil snake-mode) (when (zerop (snake-final-y-velocity)) (push '(0 1) snake-velocity-queue))) (defun snake-end-game () "Terminate the current game." - (interactive) + (interactive nil snake-mode) (gamegrid-kill-timer) (use-local-map snake-null-map) (gamegrid-add-score snake-score-file snake-score)) (defun snake-start-game () "Start a new game of Snake." - (interactive) + (interactive nil snake-mode) (snake-reset-game) (snake-set-dot) (use-local-map snake-mode-map) @@ -375,7 +375,7 @@ Argument SNAKE-BUFFER is the name of the buffer." (defun snake-pause-game () "Pause (or resume) the current game." - (interactive) + (interactive nil snake-mode) (setq snake-paused (not snake-paused)) (message (and snake-paused "Game paused (press p to resume)"))) @@ -386,6 +386,7 @@ Argument SNAKE-BUFFER is the name of the buffer." (define-derived-mode snake-mode special-mode "Snake" "A mode for playing Snake." + :interactive nil (add-hook 'kill-buffer-hook 'gamegrid-kill-timer nil t) |