;;; 5x5.el --- simple little puzzle game
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009 Free Software Foundation, Inc.
+;; 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Dave Pearson <davep@davep.org>
;; Maintainer: Dave Pearson <davep@davep.org>
(defun 5x5-new-game ()
"Start a new game of `5x5'."
(interactive)
- (when (if (interactive-p) (5x5-y-or-n-p "Start a new game? ") t)
+ (when (if (called-interactively-p 'interactive)
+ (5x5-y-or-n-p "Start a new game? ") t)
(setq 5x5-x-pos (/ 5x5-grid-size 2)
5x5-y-pos (/ 5x5-grid-size 2)
5x5-moves 0