From d45bad350834876a0b7e625039313bd1f643c50b Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Fri, 14 Dec 2018 18:24:21 +0100 Subject: Fixes the fix of #407. Is this temporary. This fix is not completely satisfying for the following reason: 1- I had to add a new hook in generic code. But I don't see how we could avoid this: the computation of options must happen AFTER the proof-prog-name is asked to the user, because this computation depends on the version of coq. 2- We should fix the synchronization between coq-prog-name and proof-prog-name. Either remove coq-prog-name and use only proof-prog-name, or have the generic coq always point to some (proof-ass-sym prog-name). --- generic/proof-shell.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'generic') diff --git a/generic/proof-shell.el b/generic/proof-shell.el index a176283d..6287629c 100644 --- a/generic/proof-shell.el +++ b/generic/proof-shell.el @@ -295,6 +295,10 @@ In this case `proof-shell-filter' must be called again after it finished.") (setq string (replace-match "" t t string))) string) +(defvar proof-shell-before-process-hook nil + "Functions run from `proof-shell-start' just before + starting the prover process. Last chance to modify + xxx-prog-args and xxx-prog-name") (defun proof-shell-start () "Initialise a shell-like buffer for a proof assistant. @@ -321,6 +325,10 @@ process command." (setq proof-prog-name (proof-strip-whitespace-at-end (read-shell-command "Run process: " prog-name))))) + ;; Once proof-prog-name is set (possibly asked to the user by the + ;; code above), some final option setting may need to be done. + (run-hooks 'proof-shell-before-process-hook) + (let ((proc (downcase proof-assistant))) -- cgit v1.2.3