changeset 22211:c8fa861cb852

(solitaire-possible-move): Use funcall to invoke movesymbol.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 May 1998 16:49:00 +0000
parents f741b3e11e37
children b95ba3830bc9
files lisp/play/solitaire.el
diffstat 1 files changed, 12 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/solitaire.el	Sun May 24 16:47:05 1998 +0000
+++ b/lisp/play/solitaire.el	Sun May 24 16:49:00 1998 +0000
@@ -333,20 +333,18 @@
 which a stone will be taken away) and target."
 
   (save-excursion
-    (let (move)
-      (fset 'move movesymbol)
-      (if (memq movesymbol solitaire-valid-directions)
-	  (let ((start (point))
-		(skip (progn (move) (point)))
-		(target (progn (move) (point))))
-	    (if (= skip target)
-		"Off Board!"
-	      (if (or (/= ?o (char-after start))
-		      (/= ?o (char-after skip))
-		      (/= ?. (char-after target)))
-		  "Wrong move!"
-		(list start skip target))))
-	"Not a valid direction"))))
+    (if (memq movesymbol solitaire-valid-directions)
+	(let ((start (point))
+	      (skip (progn (funcall movesymbol) (point)))
+	      (target (progn (funcall movesymbol) (point))))
+	  (if (= skip target)
+	      "Off Board!"
+	    (if (or (/= ?o (char-after start))
+		    (/= ?o (char-after skip))
+		    (/= ?. (char-after target)))
+		"Wrong move!"
+	      (list start skip target))))
+      "Not a valid direction")))
 
 (defun solitaire-move (dir)
   "Pseudo-prefix command to move a stone in Solitaire."