diff options
author | Bastien <bzg@gnu.org> | 2020-02-11 14:35:30 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-02-11 14:35:30 +0100 |
commit | 713c8d5abaa62e11c2e7ba6afd35b8dc059b7bd4 (patch) | |
tree | 557216747286bb9e1dbb8cd0a222e90b6ff2b4e1 | |
parent | 5acf4d4692a785e1dbaf962b9e6b1188a5ae572a (diff) | |
download | org-mode-713c8d5abaa62e11c2e7ba6afd35b8dc059b7bd4.tar.gz |
ob-core.el: Respect `org-babel-tangle-uncomment-comments'
* lisp/ob-core.el (org-babel-expand-noweb-references): Respect
`org-babel-tangle-uncomment-comments'.
Thanks to Immanuel Litzroth for reporting this.
-rw-r--r-- | lisp/ob-core.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 651561a..a6368ad 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2764,11 +2764,12 @@ block but are passed literally to the \"example-block\"." (lambda (s) ;; Comment, according to LANG mode, ;; string S. Return new string. - (with-temp-buffer - (funcall (org-src-get-lang-mode lang)) - (comment-region (point) - (progn (insert s) (point))) - (org-trim (buffer-string))))) + (unless org-babel-tangle-uncomment-comments + (with-temp-buffer + (funcall (org-src-get-lang-mode lang)) + (comment-region (point) + (progn (insert s) (point))) + (org-trim (buffer-string)))))) (expand-body (lambda (i) ;; Expand body of code blocked |