]> code.delx.au - gnu-emacs-elpa/commitdiff
use apply in chess-database-query
authorMario Lang <mlang@delysid.org>
Fri, 23 Jan 2004 16:54:50 +0000 (16:54 +0000)
committerMario Lang <mlang@delysid.org>
Fri, 23 Jan 2004 16:54:50 +0000 (16:54 +0000)
chess-database.el

index c9ad6dc5f4653655cec6efbd8d19d94634706336..6db8ba73d36fd8b80bd6ca7f2f1c5e703e83bbaf 100644 (file)
 (defun chess-database-count (database)
   (chess-database-command database 'count))
 
+(defun chess-database-read-only-p (database)
+  "Return non-nil if DATABASE is read only."
+  (chess-database-command database 'read-only-p))
+
 (defun chess-database-read (database index)
+  "Return from DATABASE the chess game object at INDEX."
   (chess-database-command database 'read index))
 
 (defun chess-database-write (database game)
   (chess-database-command database 'replace game index))
 
 (defun chess-database-query (database &rest terms)
-  (chess-database-command database 'query terms))
+  "Run a query on DATABASE.
+TERMS is partly dependent on the chess-database module in use.
+chess-scid:
+ tree-search GAME: Perform a tree search on the last position of GAME."
+  (apply 'chess-database-command database 'query terms))
 
 (provide 'chess-database)