소스 검색

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.
Bastien 5 년 전
부모
커밋
713c8d5aba
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      lisp/ob-core.el

+ 6 - 5
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