Function: comint-delchar-or-maybe-eof

comint-delchar-or-maybe-eof is an interactive and byte-compiled function defined in comint.el.gz.

Signature

(comint-delchar-or-maybe-eof &optional ARG)

Documentation

Behave like the global binding or send an EOF to subprocess.

Sends an EOF only if point is at the end of the buffer and there is no input.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint-delchar-or-maybe-eof (&optional _arg)
  "Behave like the global binding 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 nil comint-mode)
  (let ((proc (get-buffer-process (current-buffer))))
    (if (and (eobp) proc (= (point) (marker-position (process-mark proc))))
	(comint-send-eof)
      (let ((cmd (lookup-key global-map (this-command-keys))))
	(call-interactively (or (command-remapping cmd) cmd))))))