From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: How to make Ctrl-d not log off the shell? Date: Wed, 16 May 2007 08:48:24 +0200 Message-ID: <464AA938.9070507@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1179298210 30305 80.91.229.12 (16 May 2007 06:50:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 May 2007 06:50:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: tyler.smith@mail.mcgill.ca Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 16 08:50:09 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 1HoDKq-0003fu-6Z for geh-help-gnu-emacs@m.gmane.org; Wed, 16 May 2007 08:50:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoDSn-0003qk-0s for geh-help-gnu-emacs@m.gmane.org; Wed, 16 May 2007 02:58:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoDSZ-0003qN-LC for help-gnu-emacs@gnu.org; Wed, 16 May 2007 02:58:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoDSX-0003qA-3l for help-gnu-emacs@gnu.org; Wed, 16 May 2007 02:58:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoDSW-0003q7-UX for help-gnu-emacs@gnu.org; Wed, 16 May 2007 02:58:04 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HoDKX-0001fr-JX for help-gnu-emacs@gnu.org; Wed, 16 May 2007 02:49:50 -0400 Original-Received: (qmail invoked by alias); 16 May 2007 06:49:43 -0000 Original-Received: from N831P007.adsl.highway.telekom.at (EHLO [62.47.47.199]) [62.47.47.199] by mail.gmx.net (mp003) with SMTP; 16 May 2007 08:49:43 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX184kb8tUig4de/EDkol8McQB9pAJE7ziUgfOspzoR P4PGlACB9WCO5z User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6 (newer, 1) 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:44026 Archived-At: We could rather do (defun comint-delchar-or-maybe-eof (arg) "Delete ARG characters forward or send an EOF to subprocess. Sends an EOF only if point is at the end of the buffer and there is no input." (interactive "p") (let ((proc (get-buffer-process (current-buffer)))) (if (and (eobp) proc (= (point) (marker-position (process-mark proc)))) (when (y-or-n-p "Really send EOF? ") (comint-send-eof)) (delete-char arg))))