From 254f17d022353ae5dc95d8a5148a59c8ec9206ee Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 10 Dec 2017 19:27:05 +0200 Subject: [PATCH] Add a REPL shortcut for `cider-repl-require-repl-utils` This makes it easy to require common REPL utility functions like `doc`, `source`, etc. in REPL buffers. Those utils are auto-required in the initial namespace (typically `user`), but you have to require them yourself after switching to new namespaces. --- CHANGELOG.md | 1 + cider-repl.el | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2c41fb12..3146ef9f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * [#2082](https://github.com/clojure-emacs/cider/pull/2082), [cider-nrepl#440](https://github.com/clojure-emacs/cider-nrepl/pull/440): Add specialized stacktraces for clojure.spec assertions. * [#2111](https://github.com/clojure-emacs/cider/pull/2111): Add `cider-pprint-eval-last-sexp-to-comment` and `cider-pprint-eval-defun-to-comment`. +* Add a REPL shortcut for `cider-repl-require-repl-utils` (this makes it easy to require common functions like `doc`, `source`, etc. in REPL buffers). ### Changes diff --git a/cider-repl.el b/cider-repl.el index 2682fa81b..99d6398ee 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -1381,6 +1381,7 @@ constructs." (cider-repl-add-shortcut "quit" #'cider-quit) (cider-repl-add-shortcut "restart" #'cider-restart) (cider-repl-add-shortcut "version" #'cider-version) +(cider-repl-add-shortcut "require-repl-utils" #'cider-repl-require-repl-utils) (defconst cider-repl-shortcuts-help-buffer "*CIDER REPL Shortcuts Help*") @@ -1507,6 +1508,7 @@ constructs." "--" ["Set REPL ns" cider-repl-set-ns] ["Toggle pretty printing" cider-repl-toggle-pretty-printing] + ["Require REPL utils" cider-repl-require-repl-utils] "--" ["Browse classpath" cider-classpath] ["Browse classpath entry" cider-open-classpath-entry]