summaryrefslogtreecommitdiff
path: root/chess-display.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-11 08:13:11 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-11 08:13:11 +0000
commit03bbcedb1ea099c772258cdfaa52bd4383abaa00 (patch)
tree37c00e1bb374c4770382a3bd654473656ae54305 /chess-display.el
parent232756b32dab6030f711b197851c9e4b9540994d (diff)
*** no comment ***
Diffstat (limited to 'chess-display.el')
-rw-r--r--chess-display.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/chess-display.el b/chess-display.el
index f62fdbb..4cbd98c 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -374,10 +374,16 @@ that is supported by most displays, and is the default mode."
:type '(repeat symbol)
:group 'chess-display)
+(defcustom chess-display-boring-events
+ '(set-data set-tags set-tag draw abort undo shutdown)
+ "Events which will not even cause a refresh of the display."
+ :type '(repeat symbol)
+ :group 'chess-display)
+
(defun chess-display-event-handler (game display event &rest args)
"This display module presents a standard chessboard.
See `chess-display-type' for the different kinds of displays."
- (unless (memq event '(set-data set-tags set-tag))
+ (unless (memq event chess-display-boring-events)
(with-current-buffer display
(cond
((eq event 'shutdown)
@@ -428,7 +434,8 @@ See `chess-display-type' for the different kinds of displays."
(define-key map [?E] 'chess-display-edit-board)
(define-key map [?F] 'chess-display-set-from-fen)
(define-key map [?I] 'chess-display-invert)
- (define-key map [?M] 'chess-display-manual-move)
+ ;;(define-key map [?M] 'chess-display-manual-move)
+ (define-key map [?M] 'chess-display-match)
(define-key map [?N] 'chess-display-abort)
(define-key map [?R] 'chess-display-resign)
(define-key map [?S] 'chess-display-shuffle)
@@ -652,6 +659,11 @@ Basically, it means we are playing, not editing or reviewing."
(chess-fischer-random-position))
(ding)))
+(defun chess-display-match (whom)
+ "Resign the current game."
+ (interactive "sWhom do you wish to play? ")
+ (chess-game-run-hooks chess-display-game 'match whom))
+
(defun chess-display-resign ()
"Resign the current game."
(interactive)