From 779b03f3049e8032ccac7ac9bdb957ee4c115ea4 Mon Sep 17 00:00:00 2001 From: vapniks Date: Tue, 23 Apr 2019 00:56:11 +0100 Subject: [PATCH 1/2] Make psci argument optional so repl-toggle works --- psci.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/psci.el b/psci.el index 0d7dc2b..164c48f 100644 --- a/psci.el +++ b/psci.el @@ -51,6 +51,7 @@ (require 'comint) (require 'dash) (require 'purescript-font-lock) +(require 'cl-lib) ;; constants or variables @@ -133,7 +134,7 @@ Otherwise, just return PATH." ;; public functions ;;;###autoload -(defun psci (project-root-folder) +(cl-defun psci (&optional (project-root-folder (psci--project-root!))) "Run an inferior instance of \"psci\" inside Emacs, in PROJECT-ROOT-FOLDER. If not supplied, the root folder will be guessed using `projectile-project-root' (if available), otherwise it will From a3ab4275d0a6ed59fb525d0c4e7e90970d415b34 Mon Sep 17 00:00:00 2001 From: vapniks Date: Tue, 23 Apr 2019 14:35:48 +0100 Subject: [PATCH 2/2] dont use extra-sources when using pulp `pulp repl` doesn't take file arguments, so it wont work with `extra-sources` --- psci.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/psci.el b/psci.el index 164c48f..985f5ca 100644 --- a/psci.el +++ b/psci.el @@ -143,7 +143,8 @@ default to the current buffer's directory." (psci--project-root!)))) (let* ((default-directory project-root-folder) (psci-program psci/purs-path) - (extra-sources (psci--get-psc-package-sources!)) + (extra-sources (unless (string-match "pulp" psci-program) + (psci--get-psc-package-sources!)) (buffer (comint-check-proc psci/buffer-name))) ;; pop to the "*psci*" buffer if the process is dead, the ;; buffer is missing or it's got the wrong mode.