don't set up show-neighbors until after the game is started.
1 files changed, 6 insertions(+), 5 deletions(-)

M minesweeper.el
M minesweeper.el +6 -5
@@ 91,11 91,6 @@ You may mark squares, which protects the
   (interactive)
   (switch-to-buffer "minesweeper")
   (minesweeper-mode)
-  (when *minesweeper-idle-timer*
-    (cancel-timer *minesweeper-idle-timer*))
-  (setq *minesweeper-idle-timer* (run-with-idle-timer *minesweeper-idle-delay*
-						      t
-						      'minesweeper-show-neighbors))
   (minesweeper-begin-game))
 
 (defface minesweeper-blank

          
@@ 313,6 308,12 @@ Use WIDTH, HEIGHT, and MINES as the defa
                              2)
 		   (1+ *minesweeper-board-width*))
 		(ceiling (/ (float *minesweeper-board-width*) 2))))
+  (when *minesweeper-idle-timer*
+    (cancel-timer *minesweeper-idle-timer*)
+    (setq *minesweeper-idle-timer* nil))
+  (setq *minesweeper-idle-timer* (run-with-idle-timer *minesweeper-idle-delay*
+						      t
+						      'minesweeper-show-neighbors))
   (message "Good luck!"))
 
 (defun minesweeper-init (&optional width height mines)