Emacs? (was Re: total idiot question: +=, .=, etc...)

Preston Landers planders at mail.utexas.edu
Thu Jun 24 17:02:22 CEST 1999

catlee at my-deja.com writes:

> I've got the following in my .vimrc file:
> au BufReadPost * if b:current_syntax == "python"
> au BufReadPost * 	map! += ^[:s/\(\S*\)$/\1=\1+/^M:noh^MA
> au BufReadPost * endif

I'm thinking of doing a similar thing in (X)Emacs.  It's my editor of
choice though I've never actually *programmed* something into emacs
itself.  I'm wondering if anyone's already done a similar thing so I
can spare the trouble (and the learning exercise, bah.)  

I'm thinking the best way might be to hook in to abbrev mode or
something... I guess I have some homework to do in this area.  I was
just wondering if someone's already done something like this. 

In case you're just joining this thread, the general idea is to have
your editor expand this:

foo += 1

to this:

foo = foo + 1

In theory it sounds easy enough.  It's just a simple matter of



More information about the Python-list mailing list