ox-coq.el: Clean up

* lisp/ob-coq.el: Create a variable `coq-program-name' and remove unused
  `org-babel-coq-eoe'.

  (org-babel-coq-initiate-session): Use `coq-program-name'.
This commit is contained in:
Alan Schmitt 2016-02-10 09:34:37 +01:00
parent 94b78a1198
commit 90ec88d71c
1 changed files with 4 additions and 3 deletions

View File

@ -35,11 +35,12 @@
(declare-function run-coq "ext:coq-inferior.el" (cmd)) (declare-function run-coq "ext:coq-inferior.el" (cmd))
(declare-function coq-proc "ext:coq-inferior.el" ()) (declare-function coq-proc "ext:coq-inferior.el" ())
(defvar coq-program-name "coqtop"
"Name of the coq toplevel to run.")
(defvar org-babel-coq-buffer "*coq*" (defvar org-babel-coq-buffer "*coq*"
"Buffer in which to evaluate coq code blocks.") "Buffer in which to evaluate coq code blocks.")
(defvar org-babel-coq-eoe "org-babel-coq-eoe")
(defun org-babel-coq-clean-prompt (string) (defun org-babel-coq-clean-prompt (string)
(if (string-match "^[^[:space:]]+ < " string) (if (string-match "^[^[:space:]]+ < " string)
(substring string 0 (match-beginning 0)) (substring string 0 (match-beginning 0))
@ -70,7 +71,7 @@ If there is not a current inferior-process-buffer in SESSION then
create one. Return the initialized session." create one. Return the initialized session."
(unless (fboundp 'run-coq) (unless (fboundp 'run-coq)
(error "`run-coq' not defined, load coq-inferior.el")) (error "`run-coq' not defined, load coq-inferior.el"))
(save-window-excursion (run-coq "coqtop")) (save-window-excursion (run-coq coq-program-name))
(sit-for 0.1) (sit-for 0.1)
(get-buffer org-babel-coq-buffer)) (get-buffer org-babel-coq-buffer))