diff options
| author | Hendrik Tews | 2020-11-20 23:12:09 +0100 |
|---|---|---|
| committer | Hendrik Tews | 2020-12-07 14:56:32 +0100 |
| commit | 1689a494635fce5fbbadbdc3bed50299fd7521ab (patch) | |
| tree | efe420b3488a3fdea747afc099e3f274c8f59dc0 | |
| parent | ccb37e8026e208825c10f4d5ce64378430e5f7a3 (diff) | |
fix coq-callcoq for emacs 27
Use process-file and omit find-file-name-handler, because
process-file takes care of file handlers already.
Fixes #525
| -rw-r--r-- | coq/coq-system.el | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/coq/coq-system.el b/coq/coq-system.el index 637e0a27..2cc29e00 100644 --- a/coq/coq-system.el +++ b/coq/coq-system.el @@ -112,21 +112,14 @@ The given option should make coqtop return immediately. Optionally check the return code and return nil if the check fails. This function supports calling coqtop via tramp." - (let* ((default-directory - (if (file-accessible-directory-p default-directory) - default-directory - "/")) - (coq-command (shell-quote-argument (or coq-prog-name "coqtop")))) + (let ((coq-command (or coq-prog-name "coqtop")) + retv) (with-temp-buffer - ;; Use `shell-command' via `find-file-name-handler' instead of - ;; `process-line': when the buffer is running TRAMP, PG uses - ;; `start-file-process', loading the binary from the remote server. - (let* ((shell-command-str (format "%s %s" coq-command (or option ""))) - (fh (find-file-name-handler default-directory 'shell-command)) - (retv (if fh (funcall fh 'shell-command shell-command-str (current-buffer)) - (shell-command shell-command-str (current-buffer))))) - (if (or (not expectedretv) (equal retv expectedretv)) - (buffer-string)))))) + (setq retv (if option + (process-file coq-command nil t nil option) + (process-file coq-command nil t nil))) + (if (or (not expectedretv) (equal retv expectedretv)) + (buffer-string))))) (defun coq-autodetect-version (&optional interactive-p) "Detect and record the version of Coq currently in use. |
