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

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

Re: Running just-one-space after expand-abbrev


From: Nikolaj Schumacher
Subject: Re: Running just-one-space after expand-abbrev
Date: Mon, 17 Nov 2008 16:52:55 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Ian Eure <ian@digg.com> wrote:

> On Nov 13, 2008, at 11:33 AM, Nikolaj Schumacher wrote:
>
>> (defun tab-command ()
>>  "Do the right thing for the tab key."
>>  (interactive)
>>  (or (expand-abbrev)
>>      (indent-according-to-mode)))
>>
>> My tab-command does in fact do many more things depending on context.
>> This is the abridged version. :)
>>
> Alas, this doesn't solve the case I illustrated, since I want to
> eliminate extra whitespace from the middle of the line, rather than
> fix whitespace at the beginning.

I think you misunderstood.  The `indent-according-to-mode' part is just
for compatibility for the old meaning of tab.  The solution I use is:

void prot function
         ^

With cursor at ^ I just use my command instead of space.  So the second
space is never added.

regards,
Nikolaj Schumacher




reply via email to

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