summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-10 13:11:48 (GMT)
committer Nicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-10 13:11:48 (GMT)
commita1d9daa4527951fcca54133ea2fc1d6b645c227a (patch)
tree912ca83cf75869d8fa389b7ea1c5c8923f03198b
parent111905ff849831069d9c2769d9e09b9a6cb1cd18 (diff)
downloadorg-mode-master.zip
org-mode-master.tar.gz
org-element: Fix src-block interpreterHEADmaster
* lisp/org-element.el (org-element-src-block-interpreter): Fix function according to previous change.
-rw-r--r--lisp/org-element.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org-element.el b/lisp/org-element.el
index b9acdae..c7a96b4 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -2443,11 +2443,12 @@ Assume point is at the beginning of the block."
((or org-src-preserve-indentation
(org-element-property :preserve-indent src-block))
val)
- ((zerop org-edit-src-content-indentation) val)
+ ((zerop org-edit-src-content-indentation)
+ (org-remove-indentation val))
(t
(let ((ind (make-string org-edit-src-content-indentation ?\s)))
(replace-regexp-in-string
- "\\(^\\)[ \t]*\\S-" ind val nil nil 1)))))))
+ "^" ind (org-remove-indentation val))))))))
(concat (format "#+BEGIN_SRC%s\n"
(concat (and lang (concat " " lang))
(and switches (concat " " switches))