[Top][All Lists]

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

RE: [PATCH] Add smart-space command.

From: Michal Nazarewicz
Subject: RE: [PATCH] Add smart-space command.
Date: Wed, 05 Dec 2012 00:11:51 +0100
User-agent: Notmuch/ (http://notmuchmail.org) Emacs/ (x86_64-unknown-linux-gnu)

>> The patch below adds a smart-space command which is sort of
>> a generalised just-one-space.  The main difference is that it behaves
>> differently depending on how many times it has been called, and cycles
>> between three states:
>> 1. just one space
>> 2. no space at all
>> 3. original spacing

On Tue, Dec 04 2012, Drew Adams wrote:
> I have nothing special to say about the command, and I haven't tried it or
> looked at the code.  But from the description I would suggest perhaps renaming
> it to suggest more of what it does: `cycle-spacing' or some such.

Sure, that sounds fine by me.  Truth to be said, I could not came up
with a good name so I escaped into the “smart” realm. ;)

> Wrt adding a command that does what you describe: I think it's a good idea.  
> The
> cycling might even include using a hard (nobreak) space.  Or include
> `fixup-whitespace'.  Or `delete-horizontal-space'.  The cycling choices could
> even be customizable.

The second state is `delete-horizontal-space' (with backward-only being
nil) essentially, but yes, I thought about making something even more
configurable, like accepting a list of states or something, but I didn't
want to make the function too complex, and rather get it to do what
I think would be the most useful thing.

Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: address@hidden>--------------ooO--(_)--Ooo--

Attachment: pgp8E3ukHKJGi.pgp
Description: PGP signature

reply via email to

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