unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch: minor blackbox.el fix
@ 2008-01-06 16:29 Tom Tromey
  2008-01-08  8:34 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2008-01-06 16:29 UTC (permalink / raw)
  To: emacs-devel

This patch adds a "q" key binding to blackbox, to bury the buffer.

Also, locally I found that RET was doing the wrong thing in blackbox,
and this patch arranges to redefine newline-and-indent as well.  This
fixed the problem I saw.

Tom

2008-01-06  Tom Tromey  <tromey@redhat.com>

	* play/blackbox.el (blackbox-mode-map): Rebind
	newline-and-indent.  Bind "q" to bury-buffer.

Index: lisp/play/blackbox.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/play/blackbox.el,v
retrieving revision 1.27
diff -u -r1.27 blackbox.el
--- lisp/play/blackbox.el	1 Dec 2007 09:06:35 -0000	1.27
+++ lisp/play/blackbox.el	6 Jan 2008 16:55:12 -0000
@@ -107,7 +107,9 @@
     (blackbox-redefine-key map 'move-beginning-of-line 'bb-bol)
     (define-key map " " 'bb-romp)
     (define-key map [insert] 'bb-romp)
+    (define-key map "q" 'bury-buffer)
     (blackbox-redefine-key map 'newline 'bb-done)
+    (blackbox-redefine-key map 'newline-and-indent 'bb-done)
     map))
 
 ;; Blackbox mode is suitable only for specially formatted data.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch: minor blackbox.el fix
  2008-01-06 16:29 Patch: minor blackbox.el fix Tom Tromey
@ 2008-01-08  8:34 ` Glenn Morris
  2008-01-08 19:36   ` Tom Tromey
  2008-01-09  0:47   ` Tom Tromey
  0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2008-01-08  8:34 UTC (permalink / raw)
  To: tromey; +Cc: emacs-devel

Tom Tromey wrote:

> This patch adds a "q" key binding to blackbox, to bury the buffer.

OK.

> Also, locally I found that RET was doing the wrong thing in blackbox,
> and this patch arranges to redefine newline-and-indent as well.

How is it that RET runs newline-and-indent and indent for you? Have
you globally rebound it? Would changing from blackbox-redefine-key to

(define-key map [return] 'bb-done)

be better than adding a binding for newline-and-indent?

> +    (define-key map "q" 'bury-buffer)
>      (blackbox-redefine-key map 'newline 'bb-done)
> +    (blackbox-redefine-key map 'newline-and-indent 'bb-done)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch: minor blackbox.el fix
  2008-01-08  8:34 ` Glenn Morris
@ 2008-01-08 19:36   ` Tom Tromey
  2008-01-09  0:47   ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2008-01-08 19:36 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>>>>> "GM" == Glenn Morris <rgm@gnu.org> writes:

>> Also, locally I found that RET was doing the wrong thing in blackbox,
>> and this patch arranges to redefine newline-and-indent as well.

GM> How is it that RET runs newline-and-indent and indent for you? Have
GM> you globally rebound it? Would changing from blackbox-redefine-key to

Darn, I do have it bound globally, and I didn't think to look at that.
Sorry about that.

GM> (define-key map [return] 'bb-done)
GM> be better than adding a binding for newline-and-indent?

Yes, I think that would be better.

Thanks for reviewing this.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch: minor blackbox.el fix
  2008-01-08  8:34 ` Glenn Morris
  2008-01-08 19:36   ` Tom Tromey
@ 2008-01-09  0:47   ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2008-01-09  0:47 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

GM> (define-key map [return] 'bb-done)
GM> be better than adding a binding for newline-and-indent?

I neglected to send the updated patch.
Here it is.

Tom

2008-01-08  Tom Tromey  <tromey@redhat.com>

	* play/blackbox.el (blackbox-mode-map): Bind [return] and "q".

Index: lisp/play/blackbox.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/play/blackbox.el,v
retrieving revision 1.28
diff -u -r1.28 blackbox.el
--- lisp/play/blackbox.el	8 Jan 2008 20:44:08 -0000	1.28
+++ lisp/play/blackbox.el	9 Jan 2008 01:18:27 -0000
@@ -107,6 +107,8 @@
     (blackbox-redefine-key map 'move-beginning-of-line 'bb-bol)
     (define-key map " " 'bb-romp)
     (define-key map [insert] 'bb-romp)
+    (define-key map "q" 'bury-buffer)
+    (define-key map [return] 'bb-done)
     (blackbox-redefine-key map 'newline 'bb-done)
     map))

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-09  0:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 16:29 Patch: minor blackbox.el fix Tom Tromey
2008-01-08  8:34 ` Glenn Morris
2008-01-08 19:36   ` Tom Tromey
2008-01-09  0:47   ` Tom Tromey

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).