浏览代码

ob-fortran: Use a defcustom for fortran compiler

* lisp/ob-fortran.el (org-babel-fortran-compiler): Change `defvar' to
`defcustom' so that the fortran compiler is customizable like almost
all other org-babel compilers.

TINYCHANGE

Sometimes the compiler isn't `gfortran` (but e.g. `gfortran10`
etc.). Accomodate for that like we do with all other org-babel
language integrations.
Nico Sonack 3 年之前
父节点
当前提交
f76d4d103f
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      lisp/ob-fortran.el

+ 5 - 3
lisp/ob-fortran.el

@@ -40,9 +40,11 @@
 
 (defvar org-babel-default-header-args:fortran '())
 
-(defvar org-babel-fortran-compiler "gfortran"
-  "fortran command used to compile a fortran source code file into an
-  executable.")
+(defcustom org-babel-fortran-compiler "gfortran"
+  "Fortran command used to compile Fortran source code file."
+  :group 'org-babel
+  :package-version '(Org . "9.5")
+  :type  'string)
 
 (defun org-babel-execute:fortran (body params)
   "This function should only be called by `org-babel-execute:fortran'."