From 1c6d2e96a85addcad0f06d61d3cc3b1118f6b76a Mon Sep 17 00:00:00 2001 From: "James N. V. Cash" Date: Tue, 6 Sep 2022 22:30:01 +0300 Subject: [PATCH] ENHANCED: allow user to specify location of swipl binary --- sweep.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sweep.el b/sweep.el index 0a3fc19..37371ea 100644 --- a/sweep.el +++ b/sweep.el @@ -32,6 +32,14 @@ "SWI-Prolog Embedded in Emacs." :group 'prolog) +(defcustom sweep-swipl-path nil + "Path to the swipl binary. +When non-nil, this is used by the embedded SWI-Prolog runtime to +locate its \"home\" directory." + :package-version '((sweep . "0.1.1")) + :type 'string + :group 'sweep) + (defcustom sweep-messages-buffer-name "*sweep Messages*" "The name of the buffer to use for logging Prolog messages." :package-version '((sweep . "0.1.1")) @@ -153,8 +161,9 @@ (defun sweep-init () (apply #'sweep-initialize - (cons (expand-file-name "bin/swipl" (file-name-directory - load-file-name)) + (cons (or sweep-swipl-path + (expand-file-name "bin/swipl" (file-name-directory + load-file-name))) (cons "-q" (cons "--no-signals" sweep-init-args)))) (sweep-setup-message-hook) (sweep-start-prolog-server)) -- 2.39.2