mlang pushed a commit to branch externals/chess in repository elpa. commit 6676272a5026cf0c7bd95d2d64fa840d46434df0 Author: Mario Lang <ml...@delysid.org> Date: Tue Jun 3 11:33:41 2014 +0200
chess-search-position: Use dolist instead of mapc. mapc on a macro fails for obvious reasons. --- chess-pos.el | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chess-pos.el b/chess-pos.el index 11a2866..e2cabeb 100644 --- a/chess-pos.el +++ b/chess-pos.el @@ -84,8 +84,8 @@ ;;; Code: (require 'chess-message) +(require 'cl-lib) (eval-when-compile - (require 'cl-lib) (cl-proclaim '(optimize (speed 3) (safety 2)))) (defgroup chess-pos nil @@ -913,8 +913,8 @@ If NO-CASTLING is non-nil, do not consider castling moves." ;; test for knights and pawns (dolist (p (if piece '(?P ?N) '(?p ?n))) - (mapc 'chess--add-candidate - (chess-search-position position target p check-only no-castling))) + (dolist (cand (chess-search-position position target p check-only no-castling)) + (chess--add-candidate cand))) ;; test whether the rook or king can move to the target by castling (unless no-castling