* Blackbox key bindings.
@ 2005-10-23 20:13 Michael Cadilhac
2005-10-23 22:30 ` Michael Cadilhac
0 siblings, 1 reply; 2+ messages in thread
From: Michael Cadilhac @ 2005-10-23 20:13 UTC (permalink / raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 402 bytes --]
Hi guys !
This mail is about blackbox, but I don't know if ESR is still
interested in maintaining such package, so he's not in the Cc ;-)
I use C-t for previous line (dvorak convenience), and as blackbox.el
bind only C-p, I'm often messed up with this game as the (bb-x) and
(bb-y) aren't computed rightly.
The attached patch should fix the issue.
Regards.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: Patch for Blackbox.el --]
[-- Type: text/x-patch, Size: 2291 bytes --]
Index: lisp/play/blackbox.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/play/blackbox.el,v
retrieving revision 1.20
diff -c -r1.20 blackbox.el
*** lisp/play/blackbox.el 1 Aug 2005 15:30:16 -0000 1.20
--- lisp/play/blackbox.el 23 Oct 2005 20:02:34 -0000
***************
*** 89,111 ****
(defvar bb-balls-placed nil
"List of already placed balls.")
(unless blackbox-mode-map
(setq blackbox-mode-map (make-keymap))
(suppress-keymap blackbox-mode-map t)
! (define-key blackbox-mode-map "\C-f" 'bb-right)
! (define-key blackbox-mode-map [right] 'bb-right)
! (define-key blackbox-mode-map "\C-b" 'bb-left)
! (define-key blackbox-mode-map [left] 'bb-left)
! (define-key blackbox-mode-map "\C-p" 'bb-up)
! (define-key blackbox-mode-map [up] 'bb-up)
! (define-key blackbox-mode-map "\C-n" 'bb-down)
! (define-key blackbox-mode-map [down] 'bb-down)
! (define-key blackbox-mode-map "\C-e" 'bb-eol)
! (define-key blackbox-mode-map "\C-a" 'bb-bol)
(define-key blackbox-mode-map " " 'bb-romp)
(define-key blackbox-mode-map [insert] 'bb-romp)
! (define-key blackbox-mode-map "\C-m" 'bb-done)
! (define-key blackbox-mode-map [kp-enter] 'bb-done))
;; Blackbox mode is suitable only for specially formatted data.
(put 'blackbox-mode 'mode-class 'special)
--- 89,109 ----
(defvar bb-balls-placed nil
"List of already placed balls.")
+ (defun blackbox-redefine-key (oldfun newfun)
+ (define-key blackbox-mode-map (vector 'remap oldfun) newfun))
+
(unless blackbox-mode-map
(setq blackbox-mode-map (make-keymap))
(suppress-keymap blackbox-mode-map t)
! (blackbox-redefine-key 'backward-char 'bb-left)
! (blackbox-redefine-key 'forward-char 'bb-right)
! (blackbox-redefine-key 'previous-line 'bb-up)
! (blackbox-redefine-key 'next-line 'bb-down)
! (blackbox-redefine-key 'end-of-line 'bb-eol)
! (blackbox-redefine-key 'beginning-of-line 'bb-bol)
(define-key blackbox-mode-map " " 'bb-romp)
(define-key blackbox-mode-map [insert] 'bb-romp)
! (blackbox-redefine-key 'newline 'bb-done))
;; Blackbox mode is suitable only for specially formatted data.
(put 'blackbox-mode 'mode-class 'special)
[-- Attachment #1.1.3: Type: text/plain, Size: 242 bytes --]
--
Michael Cadilhac, a.k.a. Micha [mika] |
Epita/LRDE promo 2007 | Please note that you should
2 rue de la Convention | 08.70.65.13.14 | s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Blackbox key bindings.
2005-10-23 20:13 Blackbox key bindings Michael Cadilhac
@ 2005-10-23 22:30 ` Michael Cadilhac
0 siblings, 0 replies; 2+ messages in thread
From: Michael Cadilhac @ 2005-10-23 22:30 UTC (permalink / raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 629 bytes --]
(Sorry if this mail arrives twice)
Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:
> Hi guys !
>
> This mail is about blackbox, but I don't know if ESR is still
> interested in maintaining such package, so he's not in the Cc ;-)
>
> I use C-t for previous line (dvorak convenience), and as blackbox.el
> bind only C-p, I'm often messed up with this game as the (bb-x) and
> (bb-y) aren't computed rightly.
>
> The attached patch should fix the issue.
>
> Regards.
>
Oops, I forgot about the fact that we use _move_-end-of-line.
Sorry for the noise :-/
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: blackbox.patch --]
[-- Type: text/x-patch, Size: 2301 bytes --]
Index: lisp/play/blackbox.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/play/blackbox.el,v
retrieving revision 1.20
diff -c -r1.20 blackbox.el
*** lisp/play/blackbox.el 1 Aug 2005 15:30:16 -0000 1.20
--- lisp/play/blackbox.el 23 Oct 2005 20:02:34 -0000
***************
*** 89,111 ****
(defvar bb-balls-placed nil
"List of already placed balls.")
(unless blackbox-mode-map
(setq blackbox-mode-map (make-keymap))
(suppress-keymap blackbox-mode-map t)
! (define-key blackbox-mode-map "\C-f" 'bb-right)
! (define-key blackbox-mode-map [right] 'bb-right)
! (define-key blackbox-mode-map "\C-b" 'bb-left)
! (define-key blackbox-mode-map [left] 'bb-left)
! (define-key blackbox-mode-map "\C-p" 'bb-up)
! (define-key blackbox-mode-map [up] 'bb-up)
! (define-key blackbox-mode-map "\C-n" 'bb-down)
! (define-key blackbox-mode-map [down] 'bb-down)
! (define-key blackbox-mode-map "\C-e" 'bb-eol)
! (define-key blackbox-mode-map "\C-a" 'bb-bol)
(define-key blackbox-mode-map " " 'bb-romp)
(define-key blackbox-mode-map [insert] 'bb-romp)
! (define-key blackbox-mode-map "\C-m" 'bb-done)
! (define-key blackbox-mode-map [kp-enter] 'bb-done))
;; Blackbox mode is suitable only for specially formatted data.
(put 'blackbox-mode 'mode-class 'special)
--- 89,109 ----
(defvar bb-balls-placed nil
"List of already placed balls.")
+ (defun blackbox-redefine-key (oldfun newfun)
+ (define-key blackbox-mode-map (vector 'remap oldfun) newfun))
+
(unless blackbox-mode-map
(setq blackbox-mode-map (make-keymap))
(suppress-keymap blackbox-mode-map t)
! (blackbox-redefine-key 'backward-char 'bb-left)
! (blackbox-redefine-key 'forward-char 'bb-right)
! (blackbox-redefine-key 'previous-line 'bb-up)
! (blackbox-redefine-key 'next-line 'bb-down)
! (blackbox-redefine-key 'move-end-of-line 'bb-eol)
! (blackbox-redefine-key 'move-beginning-of-line 'bb-bol)
(define-key blackbox-mode-map " " 'bb-romp)
(define-key blackbox-mode-map [insert] 'bb-romp)
! (blackbox-redefine-key 'newline 'bb-done))
;; Blackbox mode is suitable only for specially formatted data.
(put 'blackbox-mode 'mode-class 'special)
[-- Attachment #1.1.3: Type: text/plain, Size: 242 bytes --]
--
Michael Cadilhac, a.k.a. Micha [mika] |
Epita/LRDE promo 2007 | Please note that you should
2 rue de la Convention | 08.70.65.13.14 | s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-23 22:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-23 20:13 Blackbox key bindings Michael Cadilhac
2005-10-23 22:30 ` Michael Cadilhac
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.