Function: comint-delchar-or-maybe-eof

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.

(fn ARG)