Skip to content

Remove quotes from reload and fix argument parsing #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions inf-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ If you are using REPL types, it will pickup the most appropriate
(`planck inf-clojure-load-form-planck)
(_ inf-clojure-load-form)))

(defcustom inf-clojure-reload-form "(require '\"%s\" :reload)"
(defcustom inf-clojure-reload-form "(require '%s :reload)"
"Format-string for building a Clojure expression to reload a file.
Reload forces loading of all the identified libs even if they are
already loaded.
Expand All @@ -406,7 +406,7 @@ If you are using REPL types, it will pickup the most appropriate
(inf-clojure--set-repl-type proc)
inf-clojure-reload-form)

(defcustom inf-clojure-reload-all-form "(require '\"%s\" :reload-all)"
(defcustom inf-clojure-reload-all-form "(require '%s :reload-all)"
"Format-string for building a Clojure expression to :reload-all a file.
Reload-all implies :reload and also forces loading of all libs
that the identified libs directly or indirectly load via require
Expand Down Expand Up @@ -768,12 +768,12 @@ The prefix argument ARG can change the behavior of the command:
- M-- C-u M-x `inf-clojure-reload': reloads all AND prompts."
(interactive "P")
(let* ((proc (inf-clojure-proc))
(invertp (or (equal arg "-") (equal arg '(-4))))
(promptp (or (equal arg '(4)) (equal arg '(-4))))
(ns (if promptp
(reload-all-p (or (equal arg '-) (equal arg '(-4))))
(prompt-p (or (equal arg '(4)) (equal arg '(-4))))
(ns (if prompt-p
(car (inf-clojure-symprompt "Namespace" (clojure-find-ns)))
(clojure-find-ns)))
(form (if (not invertp)
(form (if (not reload-all-p)
(inf-clojure-reload-form proc)
(inf-clojure-reload-all-form proc))))
(inf-clojure--send-string proc (format form ns))))
Expand Down