diff options
author | Eric Schulte <eric.schulte@gmx.com> | 2012-05-18 09:07:05 -0400 |
---|---|---|
committer | Eric Schulte <eric.schulte@gmx.com> | 2012-05-18 09:07:05 -0400 |
commit | fc5d53d91034c0ff8f336d8720cfb908a6b3b4b3 (patch) | |
tree | b0a3e4eb97ff02b9006d19a05334a2bb3be85acc | |
parent | 893a0915b56922d11b7576584f9110fa8737fbc0 (diff) | |
parent | 038cdffe0c4bf1686bfeb2ed11facd78dfc35870 (diff) | |
download | org-mode-fc5d53d91034c0ff8f336d8720cfb908a6b3b4b3.tar.gz |
Merge branch 'origin-maint'
-rw-r--r-- | lisp/org-exp-blocks.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el index b0bcc37..3861bc3 100644 --- a/lisp/org-exp-blocks.el +++ b/lisp/org-exp-blocks.el @@ -217,7 +217,13 @@ which defaults to the value of `org-export-blocks-witheld'." (when replacement (delete-region match-start match-end) (goto-char match-start) (insert replacement) - (unless preserve-indent + (if preserve-indent + ;; indent only the code block markers + (save-excursion + (indent-line-to indentation) ; indent end_block + (goto-char match-start) + (indent-line-to indentation)) ; indent begin_block + ;; indent everything (indent-code-rigidly match-start (point) indentation))))) ;; cleanup markers (set-marker match-start nil) |