summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-08-19 09:41:15 +0200
committerBastien Guerry <bzg@altern.org>2011-08-19 09:41:15 +0200
commit1bb83091a90fa7eb76261cbe1ef95bff902f91d8 (patch)
treee41cb840175ab9423782c5ab3a87e15f6cd71f65
parent0c6b67c191e886b0a2162684e087cdd15a724907 (diff)
downloadorg-mode-1bb83091a90fa7eb76261cbe1ef95bff902f91d8.tar.gz
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.
-rw-r--r--lisp/org.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 92780c7..c5b1f46 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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))