# HG changeset patch # User Richard M. Stallman # Date 896028540 0 # Node ID c8fa861cb85277aea069535040dfcb493da267fa # Parent f741b3e11e37b56c128534701a10469df6a9fd5b (solitaire-possible-move): Use funcall to invoke movesymbol. diff -r f741b3e11e37 -r c8fa861cb852 lisp/play/solitaire.el --- 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."