bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whites


From: Tassilo Horn
Subject: bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted
Date: Sun, 15 May 2022 21:04:05 +0200
User-agent: mu4e 1.7.20; emacs 29.0.50

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> However, that has one major drawback: now you cannot delete all
>> whitespace including newlines before/after point because that would
>> require you to provide (zerop N) and (< N 0) at the same time.
>
> Isn't `M--' the magic incantation for deleting newlines for these
> commands?  `M--' isn't the same as `C-u -1'...

Indeed, they are not the same but their prefix-numeric-value is the
same.  So now I've made it so that the prefix arg `-' has the general
meaning of including newlines but it's up to the action to decide how it
is interpreted as a number, e.g., just-one-space treats it as -1 as
usual but delete-space-before/after treat it as zero.

New patch attached.  Some final nitpicking please.  And some thoughts
about default value for cycle-spacing-actions.  Maybe only

  (just-one-space delete-all-space restore)

which would mimic the current cycle-spacing behavior?

Bye,
Tassilo

Attachment: 0001-Improve-cycle-spacing.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]