diff options
| author | Carsten Dominik <carsten.dominik@gmail.com> | 2013-02-18 08:29:04 (GMT) |
|---|---|---|
| committer | Carsten Dominik <carsten.dominik@gmail.com> | 2013-02-18 08:29:04 (GMT) |
| commit | 4708a4804fefe62e98cc8ca72afd8166a638ca84 (patch) | |
| tree | 1cdbc6fa6b02853201fd37ce86d8a79ab8496937 | |
| parent | a385c6e0e43b0127c49a1552ae6313a7a392dc83 (diff) | |
| parent | 65b404427e1e49c251c45ab4f3587c5f97358436 (diff) | |
| download | org-mode-4708a4804fefe62e98cc8ca72afd8166a638ca84.zip org-mode-4708a4804fefe62e98cc8ca72afd8166a638ca84.tar.gz | |
Merge branch 'fix-spacing-when-insert-new-heading'
| -rw-r--r-- | lisp/org.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index 62bee4e..4f8af3b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7411,7 +7411,12 @@ This is important for non-interactive uses of the command." (cond (org-insert-heading-respect-content (if (not (equal force-heading '(16))) - (org-end-of-subtree nil t) + (progn + (org-end-of-subtree nil t) + (and (looking-at "^\\*") (backward-char 1)) + (while (and (not (bobp)) + (member (char-before) '(?\ ?\t ?\n))) + (backward-delete-char 1))) (org-up-heading-safe) (org-end-of-subtree nil t)) (when (featurep 'org-inlinetask) |
