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: Thu, 13 Nov 2008 20:33:25 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Ian Eure <ian@digg.com> wrote:

> The problem is that the M-d leaves the whitespace to the left of
> "function," and the SPC to expand the abbrev gives another, so now I
> have two spaces.

This has annoyed me as well in the past.  I took a different route in
the solution.  just-one-space would collide with my finger memory when
inserting something in the middle.  Instead I chose to give the tab key
an additional function

(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. :)


regards,
Nikolaj Schumacher




reply via email to

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