John Wiegley [Fri, 29 Aug 2008 09:12:58 +0000 (05:12 -0400)]
Don't report an error if the user's sound reporting function fails to work.
This is needed on OS X, which has the `play-sound-file` function, but when
called reports an error that sound support is not available.
John Wiegley [Fri, 29 Aug 2008 06:43:55 +0000 (02:43 -0400)]
Several changes to fix byte-compile warnings, changed some iso-8859-1 encoded
files to UTF-8, and switched to using insert-file-contents instead of the
-literally variant (which doesn't respect content encodings).
John Wiegley [Fri, 29 Aug 2008 06:42:58 +0000 (02:42 -0400)]
Changed to using an autoconf/automake setup for building. This precipitated
many changes to the code, including:
- documentation has been moved into doc/
- the chess-eco opening moves are pre-generated from chess-eco.ps into
chess-eco.fen, so users don't have to wait around for it to build
- no longer using lispdoc to auto-gen function stubs in chess.texi,
this means that chess-maint.el and lispdoc.el are gone
John Wiegley [Mon, 27 Jun 2005 23:53:24 +0000 (23:53 +0000)]
(chess-plain-popup): Pass nil for the `font' argument to
`chess-display-popup-in-frame', since we don't care what the size of
the font is with textual chessboards.
John Wiegley [Mon, 27 Jun 2005 23:53:09 +0000 (23:53 +0000)]
(chess-input-shortcut): If a character is typed that is not a legal
start of a move (which only happens if it's not bound to anything
else), just ignore it.
John Wiegley [Mon, 27 Jun 2005 23:53:02 +0000 (23:53 +0000)]
(chess-images-determine-size): On Macs and
Windows, reduce the screen height by 80 instead of just 20, to
account for the Start/Status bar.
(chess-images-popup): Pass in a `font' to
`chess-display-popup-in-frame', so that the pixel height for each
graphical piece is computed correctly.
(chess-images-change-size): Foricbly popup the chess buffer when
changing the size of graphical pieces.
John Wiegley [Mon, 27 Jun 2005 23:52:42 +0000 (23:52 +0000)]
(chess-display-popup-in-frame): Added a `font' parameter, so that the
font can be set in new chessboard frames (which is necessary to get
the pixel height/width right).
Mario Lang [Mon, 1 Mar 2004 16:46:17 +0000 (16:46 +0000)]
remove chess-opening from chess-default-modules for now, if it is loaded uncompiled, it creates problems for the user, so leave it out by default for now. People who want this just need to put it back in, and make sure they are getting a compiled .elc file
Mario Lang [Sun, 29 Feb 2004 17:36:53 +0000 (17:36 +0000)]
Enhance ICC support:
Make "backs up" message work.
Rudimentary level2 datagram support through chess-ics-icc-preoutput-filter.
New variable chess-ics-icc-datagrams to define which datagrams should
be requested upon login.
New variable chess-ics-server-type which defaults to FICS, and gets set
to ICC when we encounter an ICC server.
Handle DG_KIBITZ by translating them to the FICS representation.
Handle movelist request through DG_POSITION_BEGIN2 and DG_PASTMOVE.
Mario Lang [Sun, 22 Feb 2004 19:32:27 +0000 (19:32 +0000)]
(chess-ics-ads-removed): We need to be a lot more careful when
deleteing stuff on a preoutput-filter-function. Fixed this, which also
fixes all the remaining cases of missed boards. LectureBot
ran through three Lectures without any bug, which seems good!
Mario Lang [Sun, 22 Feb 2004 13:25:13 +0000 (13:25 +0000)]
Require 'rx when compiling.
(chess-ics-style12-regexp): New constant regexp which matches
a style12 string (subgroup 1 to 32).
(chess-ics-matcher-alist): Use it.
(chess-ics-matcher-alist): Destroy game object if we see a
"no longer examining..." message.
(chess-ics-handle-style12): Rewrite using `match-string' instead of
`pop' based on the new regexp above.
(chess-ics-handle-style12): No longer `message' parse errors, rather
keep the failed board in the buffer, and add the failure info
to the front of the line. Makes finding remaining bugs a lot
easier since the buffer can be reviewed in chronological order.
Mario Lang [Sun, 22 Feb 2004 13:01:26 +0000 (13:01 +0000)]
(chess-engine-filter): We were calling `forward-line'
unconditionally. However, there is a race condition, namely,
if the last line does not end with a newline, forward-line
will skip to eob, therefore, engine regexps will simply
be missed. Fixed.
(chess-engine-entire-lines): This was a fix for the wrong problem,
removed.
John Wiegley [Sun, 8 Feb 2004 23:53:28 +0000 (23:53 +0000)]
There is no longer a `byte-compiling-files-p' function on Emacs 21.3.
At least, it's not on mine. Another way needs to be found to stub
about assert calls in the byte-compiled chess.el.
Mario Lang [Fri, 6 Feb 2004 11:18:57 +0000 (11:18 +0000)]
(chess-puzzle): Disable autosave.
(chess-puzzle-show-solution): New function (bound to ? in puzzle
displays) for showing a solution (if one is known). This typically
only works for EPD databases with either bm or pv information.
Displaying of annotations is not yet done.
Mario Lang [Thu, 5 Feb 2004 22:07:16 +0000 (22:07 +0000)]
(chess-game-to-epd): New defsubst to convert a game
object to an EPD string (or insert it).
(chess-epd-to-game): Analogous to the above.
(chess-epd-parse): Use `chess-fen-regexp'.
Mario Lang [Thu, 5 Feb 2004 22:05:04 +0000 (22:05 +0000)]
Handle .epd and .pgn files in the chess-file module. Achieved by
setting a buffer-local variable chess-file-type to either 'pgn or 'epd
on 'open, and use this info to dispatch correctly.
This change makes it possible to load .epd files with the
chess-puzzle function for instance.
Mario Lang [Thu, 5 Feb 2004 14:38:34 +0000 (14:38 +0000)]
sort of pseudobarf on refresh to easy finding of the obscure observe bug, and set back-moved-first game-data always, so that it even works if a game is reset to a new starting position
Mario Lang [Tue, 3 Feb 2004 19:00:55 +0000 (19:00 +0000)]
(chess-ics-initial-commands): New defcustom to make
the init-strings sent after login configurable.
(chess-ics-movelist-start-position): New buffer-local variable
which defaults to `chess-starting-position'. Its value (if non-nil)
is used to initialize the board when seeing a movelist header.
This is to allow for servers which have the equivalent of
"iset startpos 1" on FICS, which tells the server to automatically
send the initial position before sending a movelist. This is
to allow non-standard starting positions, and still maintain
complete game information in the game object locally.
(chess-ics-matcher-alist): If we see something like "startpos set",
we set chess-ics-movelist-start-position to nil.
(chess-ics-handle-style12): Renamed from chess-ics-handle-ics12.
Set game-data 'black-moved-first to t if we see a initial board
(move is "none"), and side-to-move is Black. Use this information
to calculate the correct game index from the supplied game sequence.
This fixes observing of arbitrary start position games where
Black moved first. (Most of LectureBot should work now).
(chess-ics-seeking): Handle "set ptime 1" prompts.
(chess-ics-ads-removed): Ditto.
Mario Lang [Mon, 2 Feb 2004 14:40:34 +0000 (14:40 +0000)]
iset startpos 1 makes requesting the movelist work for
games which were started from bsetup positions.
Attempt to route kibitzes to chess-announce.
Some other fixes to increase ICC compatibility.
Mario Lang [Sat, 31 Jan 2004 20:39:01 +0000 (20:39 +0000)]
Now finally handle seek announcements and removals.
THis time, we put stuff in comint-preoutput-filter-functions
to save lots of unnecessary regexp matches.
Mario Lang [Wed, 28 Jan 2004 21:26:37 +0000 (21:26 +0000)]
(chess-ply-castling-changes): When doing a long castle, only check if
the king can move to the d or c file without being in check. According
to the crafty-list, it is legal to do a long castle if some opponent piece
is attacking the b file.