[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: key binding question
From: |
Kevin Reeder |
Subject: |
Re: key binding question |
Date: |
Tue, 08 Apr 2003 04:09:44 GMT |
User-agent: |
Pan/0.11.2 (Unix) |
On Mon, 07 Apr 2003 03:10:36 -0700, Jerome Besnard wrote:
>> When using the python interpreter within emacs, I'd like to have the
>> up/down arrows echo previous commands. Can anyone give me the code for
>> this?
>
> The pyhton shell uses comint-mode (for input-output in shell-like
> modes). In comint mode, previous commands are echoed via C-up and
> C-down. But if you really prefer to have these with up/down arrows, you
> should set comint-previous-command and comint-next-command to up/down.
> Something (untested) like:
> (define-key comint-mode-map [up] 'comint-previous-command) (define-key
> comint-mode-map [down] 'comint-next-command)
>
> should do the trick.
I'll try C-up/down and add make the change to my init file later if
necessary. It's second nature to hit up or down when I'm using the
shell, but adding the C- shouldn't take much getting used to.
Thanks.
Kevin