unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tyler Smith <tyler.smith@mail.mcgill.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: How to make Ctrl-d not log off the shell?
Date: 16 May 2007 03:38:52 GMT	[thread overview]
Message-ID: <slrnf4l2ms.99i.tyler.smith@blackbart.mynetwork> (raw)
In-Reply-To: 1179274192.552518.267470@h2g2000hsg.googlegroups.com

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	other threads:[~2007-05-16  3:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  0:09 How to make Ctrl-d not log off the shell? mowgli
2007-05-16  3:38 ` Tyler Smith [this message]
2007-05-17  8:48   ` Dieter Wilhelm
     [not found]   ` <mailman.761.1179392245.32220.help-gnu-emacs@gnu.org>
2007-05-17 19:53     ` mowgli
2007-05-18  7:17       ` Dieter Wilhelm
2007-05-22  4:37         ` Xavier Maillard
2007-06-09 22:37   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2007-05-16  6:48 martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnf4l2ms.99i.tyler.smith@blackbart.mynetwork \
    --to=tyler.smith@mail.mcgill.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).