Subject: Re: bug#78262: 30.1; comint-delchar-or-maybe-eof doesn't respect delete-active-region

From: Juri Linkov <[email-masked]>
Date: Sun, 11 May 2025 09:40:30 +0300

forcemerge 78262 73527
thanks

> -(defun comint-delchar-or-maybe-eof (arg)
> -  "Delete ARG characters forward or send an EOF to subprocess.
> +(defun comint-delchar-or-maybe-eof ()
> +  "Do 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 "p" comint-mode)
> +  (interactive nil comint-mode)
>    (let ((proc (get-buffer-process (current-buffer))))
>      (if (and (eobp) proc (= (point) (marker-position (process-mark proc))))
>  	(comint-send-eof)
> -      (delete-char arg))))
> +      (call-interactively (lookup-key global-map (this-command-keys))))))

Since this also will fix bug#73527, merging with it.

PS: this still requires

  (put 'comint-delchar-or-maybe-eof 'delete-selection 'supersede)

that could be added later.