I restructured (pun intended) the emacs support
for restructuredtext. Basically, I replaced
the function that can create a box title (it was
recent) by a generic function that does everything
that you would want to do around a section title.
I tried to make the ultimate underlining function
on a single binding. (This code was started on
the way back from PyCon with Mr. docutils himself
sitting next to me driving while I was coding.)
Invocation of this function multiple times will do
more of what you like. It's a bit hard to explain,
full details are in the LISP code, but really, the best
thing is to bind it and try it out in your documents.
This makes it much easier to create/update
section titles. Let me know of any ideas
on how this could be improved.
;; You should bind the versatile sectioning command to some key in the text-mode
;; hook. Something like this::
;;
;; (defun user-rst-mode-hook ()
;; (local-set-key [(control ?=)] 'rest-adjust-section-title)
;; )
;; (add-hook 'text-mode-hook 'user-rst-mode-hook)
;;
Enjoy! (I think you will.)
git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils@3146 929543f6-e4f2-0310-98a6-ba3bd3dd1d04