From: Ian Eure <ian@digg.com>
To: Nikolaj Schumacher <me@nschum.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Running just-one-space after expand-abbrev
Date: Thu, 13 Nov 2008 11:52:28 -0800 [thread overview]
Message-ID: <0A57C1D8-D3D5-4EE1-9B12-313997ADCBDC@digg.com> (raw)
In-Reply-To: <m2fxlvju9m.fsf@nschum.de>
On Nov 13, 2008, at 11:33 AM, Nikolaj Schumacher wrote:
> 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. :)
>
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 I may need to disable the global abbrev mode and rebind SPC to
(self-insert-command) (and (expand-abbrev) (just-one-space)).
Thanks for the suggestion, though.
- Ian
next prev parent reply other threads:[~2008-11-13 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 17:49 Running just-one-space after expand-abbrev Ian Eure
2008-11-13 19:33 ` Nikolaj Schumacher
2008-11-13 19:52 ` Ian Eure [this message]
2008-11-17 15:52 ` Nikolaj Schumacher
[not found] <mailman.175.1226512203.26697.help-gnu-emacs@gnu.org>
2008-11-12 22:28 ` aartist
2008-11-12 23:59 ` Ian Eure
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0A57C1D8-D3D5-4EE1-9B12-313997ADCBDC@digg.com \
--to=ian@digg.com \
--cc=help-gnu-emacs@gnu.org \
--cc=me@nschum.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.