help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make Ctrl-d not log off the shell?


From: Tyler Smith
Subject: Re: How to make Ctrl-d not log off the shell?
Date: 16 May 2007 03:38:52 GMT
User-agent: slrn/0.9.8.1pl1 (Debian)

On 2007-05-16, mowgli <knowledgeless@gmail.com> wrote:
> How do you make pressing Ctrl-d not log off the shell and instead ask
> a question like Do you really want to quit? typing y quits the shell.
>

add this to your .emacs file:

(add-hook 'comint-mode-hook 
          '(lambda ()
            (define-key comint-mode-map "\C-d" 'delete-char)))


> Ctrl-d is something I love in emacs and it works on the shell too but
> sometimes is inconvinient due to this log off thing when erasing some
> characters and you accidentally keep the Ctrl-d pressed a bit more.

I've done that too - sometimes it's very inconvenient!

Tyler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]