summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chess-database.el2
-rw-r--r--chess-display.el2
-rw-r--r--chess-link.el2
-rw-r--r--chess-pgn.el4
-rw-r--r--chess-tutorial.el2
-rw-r--r--chess.el18
6 files changed, 15 insertions, 15 deletions
diff --git a/chess-database.el b/chess-database.el
index 4095f06..9c48297 100644
--- a/chess-database.el
+++ b/chess-database.el
@@ -48,7 +48,7 @@
(defun chess-database-read (database index-or-moniker)
(if (integerp index-or-moniker)
- (chess-database-command database 'read index)
+ (chess-database-command database 'read index-or-moniker)
(if (string-match "\\`\\([^:]+\\):\\([^#]+\\)#\\([0-9]+\\)\\'"
index-or-moniker)
(let* ((type (match-string 1 index-or-moniker))
diff --git a/chess-display.el b/chess-display.el
index 164185d..a4c03fb 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -932,7 +932,7 @@ to the end or beginning."
(interactive)
(chess-display-end-edit-mode)
;; reset the modeline
- (chess-display-set-index* display chess-display-index)
+ (chess-display-set-index* nil chess-display-index)
(chess-display-update nil))
(defun chess-display-clear-board ()
diff --git a/chess-link.el b/chess-link.el
index 1e4350a..04fa439 100644
--- a/chess-link.el
+++ b/chess-link.el
@@ -50,7 +50,7 @@ engine, and the computer the second engine."
(setq first-engine-type (intern (concat "chess-" first-engine-type))
second-engine-type (intern (concat "chess-" second-engine-type)))
(let* ((my-color t) ; we start out as white always
- (display (chess-create-display my-color t))
+ (display (chess-create-display my-color))
(game (chess-display-game display)))
(chess-game-set-data game 'my-color my-color)
(chess-module-set-leader display)
diff --git a/chess-pgn.el b/chess-pgn.el
index 01e4722..339b6f0 100644
--- a/chess-pgn.el
+++ b/chess-pgn.el
@@ -193,7 +193,7 @@ If INDENTED is non-nil, indent the move texts."
(find-file file))
(let ((game (chess-pgn-to-game)))
(if game
- (chess-display-set-game (chess-create-display) game)
+ (chess-display-set-game (chess-create-display t) game)
(chess-error 'could-not-read-pgn))))
;;;###autoload
@@ -324,7 +324,7 @@ If INDENTED is non-nil, indent the move texts."
(if (or (and (or (null chess-pgn-display)
(not (buffer-live-p chess-pgn-display)))
(let ((chess-game-inhibit-events t))
- (setq chess-pgn-display (chess-create-display))))
+ (setq chess-pgn-display (chess-create-display t))))
(/= (chess-game-data chess-pgn-current-game 'database-index)
(or (chess-game-data (chess-display-game chess-pgn-display)
'database-index) -1)))
diff --git a/chess-tutorial.el b/chess-tutorial.el
index 58f7343..a83eed8 100644
--- a/chess-tutorial.el
+++ b/chess-tutorial.el
@@ -24,7 +24,7 @@
(defun chess-tutorial ()
(interactive)
(let* (chess-default-modules
- (display (chess-create-display)))
+ (display (chess-create-display t)))
(with-current-buffer display
(chess-game-set-start-position
(chess-display-game nil)
diff --git a/chess.el b/chess.el
index 8018a5f..ba87480 100644
--- a/chess.el
+++ b/chess.el
@@ -206,16 +206,16 @@ available."
(defalias 'chess-session 'chess)
;;;###autoload
-(defun chess-create-display (perspective &optional display-only)
+(defun chess-create-display (perspective &optional modules-too)
"Create a display, letting the user's customization decide the style.
-If DISPLAY-ONLY is non-nil, then only a display is created, with none
-of the usual ancillary modules."
- (if display-only
- (car (chess-create-modules (list chess-default-display)
- 'chess--create-display
- (chess-game-create) perspective nil))
- (let ((display (cadr (chess-session 'none))))
- (chess-display-set-perspective* display perspective))))
+If MODULES-TOO is non-nil, also create and associate the modules
+listed in `chess-default-modules'."
+ (if modules-too
+ (let ((display (cadr (chess-session 'none))))
+ (chess-display-set-perspective* display perspective))
+ (car (chess-create-modules (list chess-default-display)
+ 'chess--create-display
+ (chess-game-create) perspective nil))))
(provide 'chess)