From 1f4b1a6dcc70a2439164c95ffe892fefc74d2c0e Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 6 Sep 2022 22:40:18 +0300 Subject: [PATCH] MODIFIED: use executable-find to locate the swipl executable... ...instead of looking for it in the sweep installation directory, which is no longer appropriate since we don't build swipl ourselves but rely on an existing installation. --- sweep.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sweep.el b/sweep.el index 37371ea..a1d08b0 100644 --- a/sweep.el +++ b/sweep.el @@ -33,9 +33,10 @@ :group 'prolog) (defcustom sweep-swipl-path nil - "Path to the swipl binary. + "Path to the swipl executable. When non-nil, this is used by the embedded SWI-Prolog runtime to -locate its \"home\" directory." +locate its \"home\" directory. Otherwise, the `executable-find' +is used to find a the swipl executable." :package-version '((sweep . "0.1.1")) :type 'string :group 'sweep) @@ -161,9 +162,7 @@ locate its \"home\" directory." (defun sweep-init () (apply #'sweep-initialize - (cons (or sweep-swipl-path - (expand-file-name "bin/swipl" (file-name-directory - load-file-name))) + (cons (or sweep-swipl-path (executable-find "swipl")) (cons "-q" (cons "--no-signals" sweep-init-args)))) (sweep-setup-message-hook) (sweep-start-prolog-server)) -- 2.39.2