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: martin rudalics
Subject: Re: How to make Ctrl-d not log off the shell?
Date: Wed, 16 May 2007 08:48:24 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

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))))





reply via email to

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