From: James N. V. Cash Date: Tue, 6 Sep 2022 19:30:01 +0000 (+0300) Subject: ENHANCED: allow user to specify location of swipl binary X-Git-Tag: v0.2.0~25 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1c6d2e96a85addcad0f06d61d3cc3b1118f6b76a;p=dict.git ENHANCED: allow user to specify location of swipl binary --- 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))