From 20a6d217c3da9e09f4866ca0fca80117d1d91c6c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 24 May 1998 16:49:00 +0000 Subject: [PATCH] (solitaire-possible-move): Use funcall to invoke movesymbol. --- lisp/play/solitaire.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el index 4ab7754b324..5b0071839f1 100644 --- a/lisp/play/solitaire.el +++ b/lisp/play/solitaire.el @@ -333,20 +333,18 @@ list containing three numbers: starting field, skipped field (from 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." -- 2.39.2