Ver código fonte

babel: languages adding their extensions to `'org-babel-tangle-lang-exts'

Eric Schulte 15 anos atrás
pai
commit
ffbeb7ffe6

+ 2 - 0
lisp/babel/langs/ob-C.el

@@ -36,6 +36,8 @@
 (require 'ob)
 (require 'cc-mode)
 
+(add-to-list 'org-babel-tangle-lang-exts '("c++" . "cpp"))
+
 (defvar org-babel-C-compiler "gcc"
   "Command used to compile a C source code file into an
   executable.")

+ 2 - 0
lisp/babel/langs/ob-asymptote.el

@@ -47,6 +47,8 @@
 ;;; Code:
 (require 'ob)
 
+(add-to-list 'org-babel-tangle-lang-exts '("asymptote" . "asy"))
+
 (defvar org-babel-default-header-args:asymptote
   '((:results . "file") (:exports . "results"))
   "Default arguments to use when evaluating a asymptote source block.")

+ 2 - 0
lisp/babel/langs/ob-clojure.el

@@ -45,6 +45,8 @@
 (require 'slime)
 (require 'swank-clojure)
 
+(add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj"))
+
 (defvar org-babel-clojure-wrapper-method
   "
 (defn spit

+ 2 - 0
lisp/babel/langs/ob-haskell.el

@@ -46,6 +46,8 @@
 (require 'haskell-mode)
 (require 'inf-haskell)
 
+(add-to-list 'org-babel-tangle-lang-exts '("haskell" . "hs"))
+
 (defvar org-babel-haskell-lhs2tex-command "lhs2tex")
 
 (defvar org-babel-haskell-eoe "\"org-babel-haskell-eoe\"")

+ 2 - 0
lisp/babel/langs/ob-latex.el

@@ -35,6 +35,8 @@
 ;;; Code:
 (require 'ob)
 
+(add-to-list 'org-babel-tangle-lang-exts '("latex" . "tex"))
+
 (defvar org-babel-default-header-args:latex
   '((:results . "latex") (:exports . "results"))
   "Default arguments to use when evaluating a latex source block.")

+ 2 - 0
lisp/babel/langs/ob-ocaml.el

@@ -41,6 +41,8 @@
 (require 'ob)
 (require 'tuareg)
 
+(add-to-list 'org-babel-tangle-lang-exts '("ocaml" . "ml"))
+
 (defvar org-babel-ocaml-eoe-indicator "\"org-babel-ocaml-eoe\";;")
 (defvar org-babel-ocaml-eoe-output "org-babel-ocaml-eoe")
 

+ 2 - 0
lisp/babel/langs/ob-perl.el

@@ -31,6 +31,8 @@
 ;;; Code:
 (require 'ob)
 
+(add-to-list 'org-babel-tangle-lang-exts '("perl" . "pl"))
+
 (defun org-babel-expand-body:perl (body params &optional processed-params)
   "Expand BODY according to PARAMS, return the expanded body."
   (let ((vars (second (or processed-params (org-babel-process-params params)))))

+ 2 - 0
lisp/babel/langs/ob-python.el

@@ -34,6 +34,8 @@
 (require 'ob-comint)
 (require (if (featurep 'xemacs) 'python-mode 'python))
 
+(add-to-list 'org-babel-tangle-lang-exts '("python" . "py"))
+
 (defun org-babel-expand-body:python (body params &optional processed-params)
   "Expand BODY according to PARAMS, return the expanded body."
   (concat

+ 2 - 0
lisp/babel/langs/ob-ruby.el

@@ -42,6 +42,8 @@
 (require 'ob)
 (require 'inf-ruby)
 
+(add-to-list 'org-babel-tangle-lang-exts '("ruby" . "rb"))
+
 (defun org-babel-expand-body:ruby (body params &optional processed-params)
   "Expand BODY according to PARAMS, return the expanded body."
   (let ((vars (second (or processed-params (org-babel-process-params params)))))