[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Abbrev , as ,_
From: |
Dan Anderson |
Subject: |
Re: Abbrev , as ,_ |
Date: |
Wed, 29 Oct 2003 23:27:48 -0500 |
Out of curiosity, wouldn't that mean that typing in:
foo = "1,2,3,4,5";
Would create:
foo = "1, 2, 3, 4, 5";
And cause problems? Granted many times commas and spaces go hand in
hand, but in scenarios like a CSV list it would be horribly wrong.
-Dan
On Wed, 2003-10-29 at 20:27, Jesper Harder wrote:
> Jiri Pejchal <xpejchal@fi.muni.cz> writes:
>
> > When I code in Java or C++ I always type space after ",".
> > For example foo(a, f)
> > ^
> > |
> >
> > Can Emacs put the space there automatically?
> > I tried to make an abbrev for it, but it didn't work for me.
>
> You could do something like this:
>
> (define-key c-mode-map "," (lambda ()
> (interactive)
> (insert ", ")))
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs