Examples: Untabify before re-inserting into Org

Leaving tabs in the code will mess up indentation in Org.
This commit is contained in:
Carsten Dominik 2009-07-06 16:08:49 +02:00
parent 280f8495ed
commit aa6654c9ce
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2009-07-06 Carsten Dominik <carsten.dominik@gmail.com>
* org-src.el (org-edit-src-exit): Untabify the example before
returning to Org.
* org-list.el (org-list-demote-modify-bullet): New option.
(org-first-list-item-p): Save point.
(org-fix-bullet-type): New optional argument FORCE-BULLET.

View File

@ -408,6 +408,7 @@ the language, a switch telling of the content should be in a single line."
(buffer (current-buffer))
(nindent org-edit-src-nindent)
code line)
(untabify (point-min) (point-max))
(save-excursion
(goto-char (point-min))
(if (looking-at "[ \t\n]*\n") (replace-match ""))