From f87a4564371a8358582a2b64d33194df11dff397 Mon Sep 17 00:00:00 2001 From: Eshel Yaron <me@eshelyaron.com> Date: Sun, 9 Oct 2022 07:41:34 +0300 Subject: [PATCH] FIXED: quote file paths passed to shell-command-to-string * sweeprolog.el: sweeprolog--ensure-module: quote paths and use packaged sweep.pl * README.org: fix typo --- README.org | 2 +- sweeprolog.el | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index f231141..3ad1b08 100644 --- a/README.org +++ b/README.org @@ -579,7 +579,7 @@ In Emacs 29, the command ~M-x cycle-spacing~ is extensible through a list of callback functions stored in the variable ~cycle-spacing-actions~. ~sweep~ leverages this facility and adds ~sweeprolog-align-spaces~ as the first action of ~cycle-spacing~. To -inhibit this ~sweeprolog-mode~ from doing so, set the user option +inhibit ~sweeprolog-mode~ from doing so, set the user option ~sweeprolog-enable-cycle-spacing~ to nil. Moreover, in Emacs 29 ~cycle-spacing~ is bound by default to ~M-SPC~, thus diff --git a/sweeprolog.el b/sweeprolog.el index 32ca768..c793c6f 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -202,11 +202,14 @@ clause." (split-string (shell-command-to-string (concat - (or sweeprolog-swipl-path (executable-find "swipl")) - " -g" - " write_sweep_module_location" - " -t" - " halt")) + (shell-quote-argument + (or sweeprolog-swipl-path (executable-find "swipl"))) + " -g write_sweep_module_location" + " -t halt " + (shell-quote-argument + (expand-file-name + "sweep.pl" + (file-name-directory load-file-name))))) "\n"))))) (condition-case _ (load sweep-module-path) -- 2.39.5