From: <bl...@us...> - 2007-12-10 12:59:06
|
Author: blais Date: 2007-12-10 13:58:39 +0100 (Mon, 10 Dec 2007) New Revision: 5471 Modified: trunk/docutils/tools/editors/emacs/rst.el Log: rst.el: bug fixes Modified: trunk/docutils/tools/editors/emacs/rst.el =================================================================== --- trunk/docutils/tools/editors/emacs/rst.el 2007-12-07 22:56:17 UTC (rev 5470) +++ trunk/docutils/tools/editors/emacs/rst.el 2007-12-10 12:58:39 UTC (rev 5471) @@ -389,9 +389,11 @@ (set (make-local-variable 'paragraph-separate) paragraph-start) (set (make-local-variable 'paragraph-start) "\f\\|>*[ \t]*$\\|>*[ \t]*[-+*] \\|>*[ \t]*[0-9#]+\\. ") - (set (make-local-variable 'indent-line-function) 'indent-relative-maybe) (set (make-local-variable 'adaptive-fill-mode) t) + ;; FIXME: No need to reset this. + ;; (set (make-local-variable 'indent-line-function) 'indent-relative) + ;; The details of the following comment setup is important because it affects ;; auto-fill, and it is pretty common in running text to have an ellipsis ;; ("...") which trips because of the rest comment syntax (".. "). @@ -1015,7 +1017,10 @@ prefix for example." (interactive) - (let* ( ;; Parse the positive and negative prefix arguments. + (let* (;; Save our original position on the current line. + (origpt (set-marker (make-marker) (point))) + + ;; Parse the positive and negative prefix arguments. (reverse-direction (and current-prefix-arg (< (prefix-numeric-value current-prefix-arg) 0))) @@ -1031,6 +1036,9 @@ ;; Run the hooks to run after adjusting. (run-hooks 'rst-adjust-hook) + ;; Make sure to reset the cursor position properly after we're done. + (goto-char origpt) + )) (defvar rst-adjust-hook nil @@ -2097,7 +2105,8 @@ )) (defun rst-backward-section () - "Like rst-forward-section, except move back one title." + "Like rst-forward-section, except move back one title. +With a prefix argument, move backward by a page." (interactive) (rst-forward-section -1)) |