eschulte pushed a commit to branch go in repository elpa. commit 63d995e1a28d24a6a1a164fcc535a169d615b23e Author: Eric Schulte <eric.schu...@gmx.com> Date: Thu May 24 20:23:13 2012 -0600
adding properties to the board string Unfortunately something seems to be broken with the preservation of string properties. --- sgf-board.el | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sgf-board.el b/sgf-board.el index 09e52ac..6fe9bd7 100644 --- a/sgf-board.el +++ b/sgf-board.el @@ -151,12 +151,14 @@ ((= size 9) (or (= 2 n) (= 4 n)))))) - (let ((val (aref board (pos-to-index pos size)))) - (cond - ((equal val :W) white-piece) - ((equal val :B) black-piece) - ((and (stringp val) (= 1 (length val)) val)) - (t (if (and (emph (car pos)) (emph (cdr pos))) "+" "."))))))) + (let* ((val (aref board (pos-to-index pos size))) + (str (cond + ((equal val :W) white-piece) + ((equal val :B) black-piece) + ((and (stringp val) (= 1 (length val)) val)) + (t (if (and (emph (car pos)) (emph (cdr pos))) "+" "."))))) + (put-text-property 0 (length str) :pos pos str) + str)))) (defun board-row-to-string (board row) (let* ((size (board-size board))