]> git.eshelyaron.com Git - sweep.git/commitdiff
MODIFIED: use executable-find to locate the swipl executable...
authorEshel Yaron <me@eshelyaron.com>
Tue, 6 Sep 2022 19:40:18 +0000 (22:40 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 6 Sep 2022 19:40:18 +0000 (22:40 +0300)
...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

index 37371ea18b09cff2f039da4e5ad26846c8cdcded..a1d08b0491412bbce17965924ede4615b9223680 100644 (file)
--- a/sweep.el
+++ b/sweep.el
   :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))