From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tyler Smith Newsgroups: gmane.emacs.help Subject: Re: How to make Ctrl-d not log off the shell? Date: 16 May 2007 03:38:52 GMT Organization: Sedgeboy Inc. Message-ID: References: <1179274192.552518.267470@h2g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1179289944 9698 80.91.229.12 (16 May 2007 04:32:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 May 2007 04:32:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 16 06:32:23 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HoBBW-0002Bt-Qz for geh-help-gnu-emacs@m.gmane.org; Wed, 16 May 2007 06:32:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoBJS-0000DH-Mr for geh-help-gnu-emacs@m.gmane.org; Wed, 16 May 2007 00:40:34 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!nx02.iad01.newshosting.com!newshosting.com!post01.iad01!news.aliant.net!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Lines: 21 Original-X-Complaints-To: abuse@aliant.net Original-Xref: shelby.stanford.edu gnu.emacs.help:148435 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44022 Archived-At: On 2007-05-16, mowgli 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