Subject: Re: bug#78909: [PATCH] Add 'forward-delete-char-hungry' command

From: Robert Pluim <[email-masked]>
Date: Fri, 27 Jun 2025 09:56:58 +0200

>>>>> On Fri, 27 Jun 2025 09:37:26 +0300, Eli Zaretskii <[email-masked]> said:

    >> From: Elijah Gabe Pérez <[email-masked]>
    >> Date: Thu, 26 Jun 2025 17:58:27 -0600
    >> 
    >> This patch adds a new command similar to
    >> `backward-delete-char-untabify`, but intended to be used forward.

    Eli> Thanks, but can you describe the rationale?

    Eli> backward-delete-char-untabify exists because when the indentation is
    Eli> done with TABs or a mix of TABs and SPCes, decrementing the
    Eli> indentation by one column might involve replacing a TAB with the
    Eli> equivalent number of SPC characters.  But this new command doesn't
    Eli> have a comparable feature, whereby it "outdents" the line by one
    Eli> column?  Instead, it seems it deletes the first character following
    Eli> point, which means if that character is a TAB, the indentation will be
    Eli> decreased by more than one column.

    Eli> So what is the purpose of having this command, and what are the use
    Eli> cases where it would be useful?

cc-mode already provides hungry versions of forwards and backwards
whitespace deletion which can be used in other modes, I donʼt see why
we need different commands. See (info "(emacs) Hungry Delete")

Although there might be a case for having a minor mode to make
enabling use of those commands easier.

Robert
--