From: Richard M. Stallman Date: Sun, 24 May 1998 16:49:00 +0000 (+0000) Subject: (solitaire-possible-move): Use funcall to invoke movesymbol. X-Git-Tag: emacs-20.3~866 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20a6d217c3da9e09f4866ca0fca80117d1d91c6c;p=emacs.git (solitaire-possible-move): Use funcall to invoke movesymbol. --- 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."