瀏覽代碼

Merge branch 'maint'

Bastien 5 年之前
父節點
當前提交
20ab65482a
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      lisp/ob-core.el

+ 6 - 5
lisp/ob-core.el

@@ -2720,11 +2720,12 @@ block but are passed literally to the \"example-block\"."
 	  (lambda (s)
 	    ;; Comment string S, according to LANG mode.  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 represented by block info I.