mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-15 23:09:57 +00:00
Examples: Untabify before re-inserting into Org
Leaving tabs in the code will mess up indentation in Org.
This commit is contained in:
parent
280f8495ed
commit
aa6654c9ce
|
@ -1,5 +1,8 @@
|
||||||
2009-07-06 Carsten Dominik <carsten.dominik@gmail.com>
|
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-list.el (org-list-demote-modify-bullet): New option.
|
||||||
(org-first-list-item-p): Save point.
|
(org-first-list-item-p): Save point.
|
||||||
(org-fix-bullet-type): New optional argument FORCE-BULLET.
|
(org-fix-bullet-type): New optional argument FORCE-BULLET.
|
||||||
|
|
|
@ -408,6 +408,7 @@ the language, a switch telling of the content should be in a single line."
|
||||||
(buffer (current-buffer))
|
(buffer (current-buffer))
|
||||||
(nindent org-edit-src-nindent)
|
(nindent org-edit-src-nindent)
|
||||||
code line)
|
code line)
|
||||||
|
(untabify (point-min) (point-max))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(if (looking-at "[ \t\n]*\n") (replace-match ""))
|
(if (looking-at "[ \t\n]*\n") (replace-match ""))
|
||||||
|
|
Loading…
Reference in a new issue