summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Lang <mlang@delysid.org>2014-03-24 20:23:50 +0100
committerMario Lang <mlang@delysid.org>2014-03-24 20:23:50 +0100
commit77d9af8ba59288c5a95a0982170404dd657d1506 (patch)
tree5e90300936154bf93c42e6dbf491d966f4ffff6e
parent878000863c6026402180dd5f81d910aef91ca43f (diff)
chess-pgn-insert-and-show-position
-rw-r--r--chess-pgn.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/chess-pgn.el b/chess-pgn.el
index 662d156..da1aa62 100644
--- a/chess-pgn.el
+++ b/chess-pgn.el
@@ -264,7 +264,7 @@ PGN text."
;;(define-key map [(control ?m)] 'chess-pgn-move)
;;(define-key map [space] 'chess-pgn-move)
- ;;(define-key map [? ] 'chess-pgn-move)
+ (define-key map [? ] 'chess-pgn-insert-and-show-position)
(when (require 'pcomplete nil t)
(setq pcomplete-default-completion-function 'chess-pgn-completions)
@@ -416,6 +416,11 @@ This does not require that the buffer be in PGN mode."
(goto-char (posn-point (event-start event))))
(chess-pgn-show-position))
+(defun chess-pgn-insert-and-show-position ()
+ (interactive)
+ (self-insert-command 1)
+ (chess-pgn-show-position))
+
(provide 'chess-pgn)
;;; chess-pgn.el ends here