Python editing with emacs/wordstar key bindings.

John J. Lee jjl at pobox.com
Thu Apr 13 17:01:42 EDT 2006


"Carl Banks" <invalidemail at aerojockey.com> writes:
[...]
> >    1) When I load a .py file, emacs automatically overrides my wordstar-mode
> > with python-mode, forcing all the keybindings back to emacs native keys.
> > Why?
[...]
> Python and wordstar are both major modes.  When python-mode is loaded,
> it replaces (not sits atop of) wordstar-mode; you can't have two major
> modes loaded at the same time.

Oh, of course -- didn't occur to me that wordstar-mode might be a
major mode.

Thomas, why not simply use the standard emacs provisions for key
rebinding?  Or are the wordstar keys modal or otherwise difficult to
implement that way, as is the case with vi bindings? (but viper does a
great job of that -- I'm using it right now)


[...]
> > Is there a better python-mode script I should be using other than the
> > default that came with emacs?
> 
> I doubt there's one that solves your problem.

Carl is right: changing python-mode is the wrong end to approach this
problem.  Change the keybindings instead.

Like I said, if you're stuck rebinding the keys, try one of the emacs
mailing lists / newsgroups.  Thanks to the kind help of such people
I've been getting away with scandalously little knowledge of my own
.emacs for years, and only just now learning a little elisp. :-)


John




More information about the Python-list mailing list