"Carl Banks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > Does anyone use emacs together with both WordStar key bindings and python > > mode? I'm afraid that Wordstar editing key commands are burned R/O into my > > knuckles! > > Old Borland C user?
Worse than that! It starts with Wordstar itself on a terminal to cp/m. It continued with Borland Pascal -> Delphi. Wordstar key controls are the only key bindings that are ergonometric on a qwerty keyboard. If you do serious typing, you don't break stride to issue editing commands. > > I would like to play with emacs for Python editing but I'm having (2) > > problems. > > > > 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? > > > > Why should a python-mode care what key bindings are in use? > > 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. > > If you want just want to use wordstar mode, you can prevent Emacs from > loading python mode by putting -*- mode: wordstar -*- on the first line > of the Python file (or second line if it uses a #!). Or, you could > remove python mode from the auto-mode-alist and interpreter-mode-alists > in your .emacs file, which I leave as an exercise. I do notice that I can invoke wordstar-mode *after* loading the .py file and get the whole enchilada. The Wordstar key bindings with the syntax highlighting. It just strikes me as odd that key bindings should be reasserted by invoking python-mode. Perhaps python-mode shouldn't be an emacs "major mode". We just want syntax highlighting and some minor formatting assist. Key bindings have nothing to do with the language. I need to learn how to edit the key re-assignment out of python-mode.el . > > 2) We get <tab> for block indentation instead of the spaces I prefer. > > In your .emacs file: > > (setq indent-tabs-mode nil) Thank you. That helps > > 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. Yes. The *real* problem here is that I need to get down and dirty with emacs/lisp when all I started looking for was a more robust editor for Python ;-) > Carl Banks > -- http://mail.python.org/mailman/listinfo/python-list