Small Emacs tweaks impoving my Python coding

Today I've spent a few minutes tweaking Emacs a little. The result is very simple yet makes a decent impact on usage.

Firstly I remembered using the c-subword-mode a long time ago, I couldn't believe I never used that in Python. Turns out there is a more genericly named subword-mode by now (emacs 23 IIUC) and it's very easy to enable for Python by default:

(add-hook 'python-mode-hook (lambda () (subword-mode 1)))

The second simple improvement was finally figuring out how to automatically enable flyspell-mode when editing Restructured Text:

(add-hook 'rst-mode-hook (lambda () (flyspell-mode 1)))

Both where so simple I can't believe I didn't do them earlier.

And while on the subject, develock-mode is great and I've been using it a very long time. Unfortunately python isn't supported out of the box, but no worries, someone has done the work already. So all you have to do is something along the lines of:

(load "~/.emacs.d/develock-py.el")

I don't think I'd still want to edit a python file without it.