diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-10 00:01:42 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-10 00:01:42 +0000 |
| commit | 3b72d987a9dfb01d9226b88d86dedf10fea67fed (patch) | |
| tree | d087e7b3093356866fc31013b579f8d9be7df981 /chess-display.el | |
| parent | 23808aea3686317c1673d32b10783329cf0bc310 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chess-display.el b/chess-display.el index 45561ca..cc3536b 100644 --- a/chess-display.el +++ b/chess-display.el @@ -355,6 +355,7 @@ See `chess-display-type' for the different kinds of displays." (define-key map [tab] 'chess-display-invert) (define-key map [??] 'describe-mode) + (define-key map [?B] 'chess-display-list-buffers) (define-key map [?C] 'chess-display-clear-board) (define-key map [?E] 'chess-display-edit-board) (define-key map [?F] 'chess-display-set-from-fen) @@ -559,6 +560,28 @@ Basically, it means we are playing, not editing or reviewing." (chess-game-resign chess-display-game) (ding))) +(defun chess-display-list-buffers () + "List all buffers related to this display's current game." + (interactive) + (when chess-display-game + (let ((buffer-list-func (symbol-function 'buffer-list))) + (unwind-protect + (let ((chess-game chess-display-game) + (lb-command (lookup-key ctl-x-map [(control ?b)])) + (ibuffer-maybe-show-regexps nil)) + (fset 'buffer-list + (function + (lambda () + (delq nil + (mapcar (function + (lambda (cell) + (and (bufferp (cdr cell)) + (buffer-live-p (cdr cell)) + (cdr cell)))) + (chess-game-hooks chess-game)))))) + (call-interactively lb-command)) + (fset 'buffer-list buffer-list-func))))) + (defun chess-display-set-current (dir) "Change the currently displayed board. Direction may be - or +, to move forward or back, or t or nil to jump |
