mlang pushed a commit to branch externals/chess
in repository elpa.
commit ad0bd9df140309728b2bbed737380299480cefc3
Author: Mario Lang <[email protected]>
Date: Mon Jul 28 12:07:54 2014 +0200
* chess-display.el (chess-display-draw-square): Add docstring.
---
ChangeLog | 2 ++
chess-display.el | 7 +++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 245d8b7..308c3e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2014-07-28 Mario Lang <[email protected]>
+ * chess-display.el (chess-display-draw-square): Add docstring.
+
* chess-database.el (chess-database-do-open): Require modules here.
(chess-database-open): Instead of only requiring modules from
`chess-database-modules'.
diff --git a/chess-display.el b/chess-display.el
index a5db238..f7238d2 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -352,6 +352,13 @@ also view the same game."
(aref chess-display-index-positions index)))
(defun chess-display-draw-square (display index &optional piece pos)
+ "(Re)draw the square of DISPLAY indicated by INDEX.
+Optional argument PIECE indicates the piece (or blank) to draw.
+If it is not provided, `chess-display-position' is consulted.
+Optional argument POS indicates the buffer position to draw the square at.
+If that is not provided, `chess-display-index-pos' is called.
+
+This function is especially useful to clear a previously set highlight."
(cl-check-type display (or null buffer))
(cl-check-type index (integer 0 63))
(cl-check-type piece (member nil ? ?P ?N ?B ?R ?Q ?K ?p ?n ?b ?r ?q ?k))