From e3c3f9d9f106877c6305eb0bb10331d1fa725177 Mon Sep 17 00:00:00 2001 From: Andrea Richiardi Date: Thu, 25 Jan 2018 19:13:07 -0800 Subject: [PATCH] Add macroexpand forms for Lumo --- CHANGELOG.md | 1 + inf-clojure.el | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f63d38..e455d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/inf-clojure.el b/inf-clojure.el index 2854761..b09b34c 100644 --- a/inf-clojure.el +++ b/inf-clojure.el @@ -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)))) @@ -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))))