[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 02/02: * chess-display.el (chess-display): Link to info node.
From: |
Mario Lang |
Subject: |
[elpa] 02/02: * chess-display.el (chess-display): Link to info node. |
Date: |
Sun, 15 Jun 2014 00:17:53 +0000 |
mlang pushed a commit to branch externals/chess
in repository elpa.
commit c2e7e1b029eceb4c9b9cc512f6b6a8c9afeb0ee7
Author: Mario Lang <address@hidden>
Date: Sun Jun 15 02:17:40 2014 +0200
* chess-display.el (chess-display): Link to info node.
---
chess-display.el | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/chess-display.el b/chess-display.el
index 1fc0295..a6e675e 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -32,8 +32,9 @@
(require 'chess-random)
(defgroup chess-display nil
- "Common code used by chess displays."
- :group 'chess)
+ "Options common to all chessboard displays."
+ :group 'chess
+ :link '(custom-manual "(chess)Chessboard displays"))
(defcustom chess-display-popup t
"If non-nil (the default), popup displays whenever a significant event
@@ -362,16 +363,14 @@ also view the same game."
(to (cadr ch)))
(funcall chess-display-event-handler 'draw-square
(chess-display-index-pos nil from) ? from)
- (let ((new-piece (chess-ply-keyword ply :promote)))
- (if new-piece
- (funcall chess-display-event-handler 'draw-square
- (chess-display-index-pos nil to)
- (if (chess-pos-side-to-move position)
- new-piece
- (downcase new-piece)) to)
- (funcall chess-display-event-handler 'draw-square
- (chess-display-index-pos nil to)
- (chess-pos-piece position from) to)))
+ (funcall chess-display-event-handler 'draw-square
+ (chess-display-index-pos nil to)
+ (or (let ((new-piece (chess-ply-keyword ply :promote)))
+ (when new-piece
+ (if (chess-pos-side-to-move position)
+ new-piece (downcase new-piece))))
+ (chess-pos-piece position from))
+ to)
(when (chess-ply-keyword ply :en-passant)
(funcall chess-display-event-handler 'draw-square
(chess-display-index-pos nil (chess-pos-en-passant
position))