浏览代码

babel: allow disabling of noweb expansion during tangling

Dan Davison 15 年之前
父节点
当前提交
0f83b2d203
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      contrib/babel/lisp/org-babel-tangle.el

+ 3 - 1
contrib/babel/lisp/org-babel-tangle.el

@@ -172,8 +172,10 @@ code blocks by language."
              (source-name (intern (or (fifth info)
                                       (format "block-%d" block-counter))))
              (src-lang (first info))
-             (body (org-babel-expand-noweb-references info))
              (params (third info))
+	     (body (if (equal "no" (cdr (assoc :noweb params)))
+		       (second info)
+		     (org-babel-expand-noweb-references info)))
              (spec (list link source-name params body (third (cdr (assoc src-lang org-babel-tangle-langs)))))
              by-lang)
         (unless (string= (cdr (assoc :tangle params)) "no") ;; maybe skip