Skip to content

Add macroexpand forms for Lumo #131

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
Jan 28, 2018
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* [#119](https://github.com/clojure-emacs/inf-clojure/pull/119): Set inf-clojure-buffer REPL type on detect.
* [#120](https://github.com/clojure-emacs/inf-clojure/pull/120): Send REPL string always, even if empty.
* [#128](https://github.com/clojure-emacs/inf-clojure/pull/128): Fix inf-clojure-apropos.
* [#131](https://github.com/clojure-emacs/inf-clojure/pull/131): Add macroexpand forms for Lumo.

## 2.0.1 (2017-05-18)

Expand Down
16 changes: 16 additions & 0 deletions inf-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -970,12 +970,20 @@ If you are using REPL types, it will pickup the most approapriate
:safe #'stringp
:package-version '(inf-clojure . "2.0.0"))

(defcustom inf-clojure-macroexpand-form-lumo
"(macroexpand '%s)"
"Lumo form to invoke macroexpand."
:type 'string
:safe #'stringp
:package-version '(inf-clojure . "2.2.0"))

(defun inf-clojure-macroexpand-form (proc)
"Return the form for macroexpansion in the Inf-Clojure PROC.
If you are using REPL types, it will pickup the most approapriate
`inf-clojure-macroexpand-form` variant."
(inf-clojure--sanitize-command
(pcase (inf-clojure--set-repl-type proc)
(`lumo inf-clojure-macroexpand-form-lumo)
(`planck inf-clojure-macroexpand-form-planck)
(_ inf-clojure-macroexpand-form))))

Expand All @@ -995,12 +1003,20 @@ If you are using REPL types, it will pickup the most approapriate
:safe #'stringp
:package-version '(inf-clojure . "2.0.0"))

(defcustom inf-clojure-macroexpand-1-form-lumo
"(macroexpand-1 '%s)"
"Lumo form to invoke macroexpand-1."
:type 'string
:safe #'stringp
:package-version '(inf-clojure . "2.2.0"))

(defun inf-clojure-macroexpand-1-form (proc)
"Return the form for macroexpand-1 in the Inf-Clojure PROC.
If you are using REPL types, it will pickup the most approapriate
`inf-clojure-macroexpand-1-form` variant."
(inf-clojure--sanitize-command
(pcase (inf-clojure--set-repl-type proc)
(`lumo inf-clojure-macroexpand-1-form-lumo)
(`planck inf-clojure-macroexpand-1-form-planck)
(_ inf-clojure-macroexpand-1-form))))

Expand Down