From 18a244269b170c139fea65a1b0ee0387a71c19f8 Mon Sep 17 00:00:00 2001 From: John Stevenson Date: Mon, 1 May 2017 17:53:16 +0100 Subject: [PATCH] New Keybinding for cider-eval-defun-to-comment Added a Spacemacs style keybinding for the function cider-eval-defun-to-comment This function evaluates and expression and displays the result as a comment on the following line. The CIDER keybinding is `C-C M-;` so the Spacemacs binding uses the `;` convention, which is also the general character for comments in Emacs. As this is an evaluation function, the keybinding is placed under the evaluation part of the major mode menu. Included documentation in the README.org file --- layers/+lang/clojure/README.org | 1 + layers/+lang/clojure/packages.el | 1 + 2 files changed, 2 insertions(+) diff --git a/layers/+lang/clojure/README.org b/layers/+lang/clojure/README.org index ea4868cb4..37f010ad7 100644 --- a/layers/+lang/clojure/README.org +++ b/layers/+lang/clojure/README.org @@ -133,6 +133,7 @@ As this state works the same for all files, the documentation is in global | Key Binding | Description | |-------------+-------------------------------------------------| +| ~SPC m e ;~ | eval sexp and show result as comment | | ~SPC m e b~ | eval buffer | | ~SPC m e e~ | eval last sexp | | ~SPC m e f~ | eval function at point | diff --git a/layers/+lang/clojure/packages.el b/layers/+lang/clojure/packages.el index 88df858d1..8389bf7ab 100644 --- a/layers/+lang/clojure/packages.el +++ b/layers/+lang/clojure/packages.el @@ -112,6 +112,7 @@ "hj" 'cider-javadoc "hn" 'cider-browse-ns + "e;" 'cider-eval-defun-to-comment "eb" 'cider-eval-buffer "ee" 'cider-eval-last-sexp "ef" 'cider-eval-defun-at-point