org.el (org-fixup-indentation): Fix various small bugs.

* org.el (org-fixup-indentation): Fix various small bugs.

Thanks to Sébastien Vauban for reporting them.
This commit is contained in:
Bastien Guerry 2011-08-19 09:41:15 +02:00
parent 0c6b67c191
commit 1bb83091a9

View file

@ -7366,15 +7366,16 @@ would end up with no indentation after the change, nothing at all is done."
col)
(while (re-search-forward
(concat "\\(" (regexp-opt org-all-time-keywords)
"\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9]*:.*$"
"\\)") drawer-end t)
"\\|" "^[ \t]*" org-tsr-regexp-both "*$"
"\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9_]*:.*$"
"\\)") (or drawer-end end) t)
(beginning-of-line)
(when (looking-at "^[ \t]+")
(goto-char (match-end 0))
(setq col (current-column))
(if (< diff 0) (replace-match ""))
(org-indent-to-column (+ diff col))
(setq drawer-end (+ diff drawer-end)))
(if drawer-end (setq drawer-end (+ diff drawer-end))))
(end-of-line))
(unless (save-excursion (end-of-line 1)
(re-search-forward prohibit end t))