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

From: Elijah Gabe Pérez <[email-masked]>
Date: Fri, 27 Jun 2025 19:02:36 -0600

Eli Zaretskii <[email-masked]> writes:

>> 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.
>
> Thanks, but can you describe the rationale?
>
> backward-delete-char-untabify exists because when the indentation is
> done with TABs or a mix of TABs and SPCes, decrementing the
> indentation by one column might involve replacing a TAB with the
> equivalent number of SPC characters.  But this new command doesn't
> have a comparable feature, whereby it "outdents" the line by one
> column?  Instead, it seems it deletes the first character following
> point, which means if that character is a TAB, the indentation will be
> decreased by more than one column.
>
> So what is the purpose of having this command, and what are the use
> cases where it would be useful?

I had originally intended to add a kind of `hungry-delete-mode`, because
sometimes this type of deletion is useful (e.g. for some programming
modes).

While `cc-mode` already have it, it's only "exclusive" for `cc-mode`
modes.

This new command was more of a kind of `c-hungry-delete-forward` than a
`backward-delete-char-untabify`.

I wasn't sure if it would be worth moving those cc-mode commands for
general use, or make/move the `hungry` feature from
`backward-delete-char-untabify` to be used generally.

-- 
                                          - E.G via GNU Emacs and Org.