From: Ian Eure <ian@digg.com>
To: aartist <aartist@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Running just-one-space after expand-abbrev
Date: Wed, 12 Nov 2008 15:59:46 -0800 [thread overview]
Message-ID: <092226E7-47E0-4DBE-8EF7-4355FF0CC6F7@digg.com> (raw)
In-Reply-To: <cf886cde-346b-473a-986f-a998aee3ebba@l33g2000pri.googlegroups.com>
On Nov 12, 2008, at 2:28 PM, aartist wrote:
> On Nov 12, 12:49 pm, Ian Eure <i...@digg.com> wrote:
>> I have abbrevs for public/protected/private: pub/prot/pri.
>>
>> I often find that I'm editing something like:
>>
>> public function foo();
>>
>> And I want to change it from public to protected. My first thought
>> is:
>> C-a M-d prot SPC
>>
>> 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.
>>
>> Is it possible to run (just-one-space) after an abbrev is expanded? I
>> tried advising (expand-abbrev), but that didn't work. I don't see any
>> hooks for that function, either.
>>
>> Ideas?
> Are you sure?
> I couldn't repeat it..
Can you explain what you did to make it work?
This is what I tried, and I just confirmed it does not work:
(defadvice abbrev-expand (after one-space activate)
"Run just-one-space after expanding an abbrev"
(just-one-space))
To be clear: This works if I hit C-x '. It does not work if I'm using
the abbrev minor mode and something is automatically expanded when I
hit SPC.
- Ian
next prev parent reply other threads:[~2008-11-12 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.175.1226512203.26697.help-gnu-emacs@gnu.org>
2008-11-12 22:28 ` Running just-one-space after expand-abbrev aartist
2008-11-12 23:59 ` Ian Eure [this message]
2008-11-12 17:49 Ian Eure
2008-11-13 19:33 ` Nikolaj Schumacher
2008-11-13 19:52 ` Ian Eure
2008-11-17 15:52 ` Nikolaj Schumacher
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=092226E7-47E0-4DBE-8EF7-4355FF0CC6F7@digg.com \
--to=ian@digg.com \
--cc=aartist@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.