Browse Source

babel: Fall back to generic expand function during tangling

Dan Davison 15 years ago
parent
commit
837e898936
1 changed files with 2 additions and 1 deletions
  1. 2 1
      contrib/babel/lisp/org-babel-tangle.el

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

@@ -176,6 +176,7 @@ code blocks by language."
              (source-name (intern (or (fifth info)
                                       (format "block-%d" block-counter))))
              (src-lang (first info))
+	     (expand-cmd (intern (concat "org-babel-expand-body:" src-lang)))
              (params (third info))
              by-lang)
         (unless (string= (cdr (assoc :tangle params)) "no") ;; maybe skip
@@ -191,7 +192,7 @@ code blocks by language."
                                         (if (assoc :no-expand params)
                                             body
                                           (funcall
-                                           (intern (concat "org-babel-expand-body:" src-lang))
+					   (if (fboundp expand-cmd) expand-cmd 'org-babel-expand-body:generic)
                                            body
                                            params)))
                                       (if (and (cdr (assoc :noweb params))