branch: elpa/toc-org
commit ac2c33dcf8d553a5bbb5773082d77f0ba272b5c5
Author: Sergei Nosov <[email protected]>
Commit: Sergei Nosov <[email protected]>
remove unnecessary spaces
---
toc-org.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/toc-org.el b/toc-org.el
index 0a85ebdeef..389cb4fc05 100644
--- a/toc-org.el
+++ b/toc-org.el
@@ -362,11 +362,12 @@ following tag formats:
(newline (forward-line 1))
;; skip drawers
- (while (re-search-forward toc-org-drawer-regexp
- (save-excursion ;; limit to next
heading
- (search-forward-regexp "^\\*"
(point-max) t))
- t)
- (skip-chars-forward "[:space:]"))
+ (let ((end
+ (save-excursion ;; limit to next heading
+ (search-forward-regexp "^\\*" (point-max) t))))
+ (while (re-search-forward toc-org-drawer-regexp end t)
+ (skip-chars-forward "[:space:]")))
+ (beginning-of-line)
;; insert newline if TOC is currently empty
(when (looking-at "^\\*")