summaryrefslogtreecommitdiff
path: root/chess-pgn.el
diff options
context:
space:
mode:
authorMario Lang <mlang@delysid.org>2004-12-06 18:20:54 +0000
committerMario Lang <mlang@delysid.org>2004-12-06 18:20:54 +0000
commit15fbb6f29ce0d9403c9194458f7cef73ca0f6776 (patch)
tree2e9d9aecb2e284ab81a82c724aa1084cd0e710e9 /chess-pgn.el
parent06c041e6452878f14c3995c895a153c51d577c25 (diff)
bug in pgn font-locking (Klaus Straubinger <KSNetz@Arcor.DE>)
Diffstat (limited to 'chess-pgn.el')
-rw-r--r--chess-pgn.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/chess-pgn.el b/chess-pgn.el
index b92a0e0..489f357 100644
--- a/chess-pgn.el
+++ b/chess-pgn.el
@@ -36,8 +36,14 @@
(goto-char (match-end 0))
(chess-game-set-tag game "Result" (match-string-no-properties 0))
(unless (eq t (car (last plies)))
- (nconc plies (list (chess-ply-create*
- (chess-ply-next-pos (car (last plies)))))))
+ (cond
+ ((string= "1/2-1/2" (match-string 1))
+ (nconc plies (list (chess-ply-create
+ (chess-ply-next-pos (car (last plies)))
+ t :drawn))))
+ (t
+ (nconc plies (list (chess-ply-create*
+ (chess-ply-next-pos (car (last plies)))))))))
(throw 'done t))
((looking-at "{")
@@ -262,7 +268,7 @@ PGN text."
(font-lock-add-keywords
'chess-pgn-mode
(list (list "\\[\\(\\S-+\\)\\s-+\".*\"\\]" 1 'font-lock-keyword-face)
- (cons "\\(1-0\\|0-1\\|1/2-1/2\\*\\)$" 'chess-pgn-bold-face))))
+ (cons "\\(1-0\\|0-1\\|1/2-1/2\\|\\*\\)$" 'chess-pgn-bold-face))))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pgn\\'" . chess-pgn-mode))