mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
Make C, C++, D, Java, Groovy compilers customizable
* ob-C.el (org-babel-C-compiler): (org-babel-C++-compiler): (org-babel-D-compiler): changed defvar to defcustom * ob-java.el (org-babel-java-command): (org-babel-java-compiler): changed defvar to defcustom * ob-groovy.el (org-babel-groovy-command): changed defvar to defcustom
This commit is contained in:
parent
d100d590e1
commit
25fc4d8344
32
lisp/ob-C.el
32
lisp/ob-C.el
@ -46,16 +46,32 @@
|
||||
|
||||
(defvar org-babel-default-header-args:C '())
|
||||
|
||||
(defvar org-babel-C-compiler "gcc"
|
||||
"Command used to compile a C source code file into an
|
||||
executable.")
|
||||
(defcustom org-babel-C-compiler "gcc"
|
||||
"Command used to compile a C source code file into an executable.
|
||||
May be either a command in the path, like gcc
|
||||
or an absolute path name, like /usr/local/bin/gcc
|
||||
parameter may be used, like gcc -v"
|
||||
:group 'org-babel
|
||||
:version "24.3"
|
||||
:type 'string)
|
||||
|
||||
(defvar org-babel-C++-compiler "g++"
|
||||
"Command used to compile a C++ source code file into an
|
||||
executable.")
|
||||
(defcustom org-babel-C++-compiler "g++"
|
||||
"Command used to compile a C++ source code file into an executable.
|
||||
May be either a command in the path, like g++
|
||||
or an absolute path name, like /usr/local/bin/g++
|
||||
parameter may be used, like g++ -v"
|
||||
:group 'org-babel
|
||||
:version "24.3"
|
||||
:type 'string)
|
||||
|
||||
(defvar org-babel-D-compiler "rdmd"
|
||||
"Command used to compile and execute a D source code file.")
|
||||
(defcustom org-babel-D-compiler "rdmd"
|
||||
"Command used to compile and execute a D source code file.
|
||||
May be either a command in the path, like rdmd
|
||||
or an absolute path name, like /usr/local/bin/rdmd
|
||||
parameter may be used, like rdmd --chatty"
|
||||
:group 'org-babel
|
||||
:version "24.3"
|
||||
:type 'string)
|
||||
|
||||
(defvar org-babel-c-variant nil
|
||||
"Internal variable used to hold which type of C (e.g. C or C++ or D)
|
||||
|
@ -36,8 +36,14 @@
|
||||
(defvar org-babel-tangle-lang-exts) ;; Autoloaded
|
||||
(add-to-list 'org-babel-tangle-lang-exts '("groovy" . "groovy"))
|
||||
(defvar org-babel-default-header-args:groovy '())
|
||||
(defvar org-babel-groovy-command "groovy"
|
||||
"Name of the command to use for executing Groovy code.")
|
||||
(defcustom org-babel-groovy-command "groovy"
|
||||
"Name of the command to use for executing Groovy code.
|
||||
May be either a command in the path, like groovy
|
||||
or an absolute path name, like /usr/local/bin/groovy
|
||||
parameters may be used, like groovy -v"
|
||||
:group 'org-babel
|
||||
:version "24.3"
|
||||
:type 'string)
|
||||
|
||||
(defun org-babel-execute:groovy (body params)
|
||||
"Execute a block of Groovy code with org-babel. This function is
|
||||
|
@ -32,11 +32,23 @@
|
||||
(defvar org-babel-tangle-lang-exts)
|
||||
(add-to-list 'org-babel-tangle-lang-exts '("java" . "java"))
|
||||
|
||||
(defvar org-babel-java-command "java"
|
||||
"Name of the java command.")
|
||||
(defcustom org-babel-java-command "java"
|
||||
"Name of the java command.
|
||||
May be either a command in the path, like java
|
||||
or an absolute path name, like /usr/local/bin/java
|
||||
parameters may be used, like java -verbose"
|
||||
:group 'org-babel
|
||||
:version "24.3"
|
||||
:type 'string)
|
||||
|
||||
(defvar org-babel-java-compiler "javac"
|
||||
"Name of the java compiler.")
|
||||
(defcustom org-babel-java-compiler "javac"
|
||||
"Name of the java compiler.
|
||||
May be either a command in the path, like javac
|
||||
or an absolute path name, like /usr/local/bin/javac
|
||||
parameters may be used, like javac -verbose"
|
||||
:group 'org-babel
|
||||
:version "24.3"
|
||||
:type 'string)
|
||||
|
||||
(defun org-babel-execute:java (body params)
|
||||
(let* ((classname (or (cdr (assoc :classname params))
|
||||
|
Loading…
Reference in New Issue
Block a user