@@ -56,11 +56,11 @@ specific CIDER release.**
5656 - [ Running Tests] ( #running-tests )
5757 - [ Navigating Stacktraces] ( #navigating-stacktraces )
5858 - [ Debugging] ( #debugging )
59+ - [ Code reloading] ( #code-reloading )
5960 - [ Managing multiple connections] ( #managing-multiple-connections )
6061- [ Configuration] ( #configuration )
6162 - [ Basic configuration] ( #basic-configuration )
6263 - [ Specifying indentation] ( #specifying-indentation )
63- - [ Code reloading] ( #code-reloading )
6464 - [ Minibuffer completion] ( #minibuffer-completion )
6565 - [ Auto-completion] ( #auto-completion )
6666 - [ Integration with other modes] ( #integration-with-other-modes )
@@ -834,6 +834,56 @@ In addition, all the usual evaluation commands (such as <kbd>C-x C-e</kbd> or
834834<kbd >C-c M-:</kbd >) will use the current lexical context (local variables) while
835835the debugger is active.
836836
837+ ### Code reloading
838+
839+ ` cider-refresh ` wraps
840+ [ clojure.tools.namespace] ( https://github.com/clojure/tools.namespace ) , and as
841+ such the same
842+ [ benefits] ( https://github.com/clojure/tools.namespace#reloading-code-motivation )
843+ and
844+ [ caveats] ( https://github.com/clojure/tools.namespace#reloading-code-preparing-your-application )
845+ regarding writing reloadable code also apply.
846+
847+ Calling ` cider-refresh ` will cause all modified Clojure files on the classpath
848+ to be reloaded. You can also provide a single prefix argument to reload all
849+ Clojure files on the classpath unconditionally, or a double prefix argument to
850+ first clear the state of the namespace tracker before reloading.
851+
852+ The above three operations are analogous to
853+ [ ` clojure.tools.namespace.repl/refresh ` ] ( http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh ) ,
854+ [ ` clojure.tools.namespace.repl/refresh-all ` ] ( http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh-all )
855+ and
856+ [ ` clojure.tools.namespace.repl/clear ` ] ( http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/clear )
857+ (followed by a normal refresh), respectively.
858+
859+ * You can define Clojure functions to be called before reloading, and after a
860+ successful reload, when using ` cider-refresh ` :
861+
862+ ``` el
863+ (setq cider-refresh-before-fn "user/stop-system!"
864+ cider-refresh-after-fn "user/start-system!")
865+ ```
866+
867+ * These must be set to the namespace-qualified names of vars bound to functions
868+ of no arguments. The functions must be synchronous (blocking), and are
869+ expected to be side-effecting - they will always be executed serially, without
870+ retries.
871+
872+ * By default, messages regarding the status of the in-progress reload will be
873+ displayed in the echo area after you call ` cider-refresh ` . The same
874+ information will also be recorded in the ` *cider-refresh-log* ` buffer, along
875+ with anything printed to ` *out* ` or ` *err* ` by ` cider-refresh-before-fn ` and
876+ ` cider-refresh-start-fn ` .
877+
878+ * You can make the ` *cider-refresh-log* ` buffer display automatically after you
879+ call ` cider-refresh ` by setting the ` cider-refresh-show-log-buffer ` variable
880+ to a non-nil value (this will also prevent any related messages from also
881+ being displayed in the echo area):
882+
883+ ``` el
884+ (setq cider-refresh-show-log-buffer t)
885+ ```
886+
837887### Managing multiple connections
838888
839889You can connect to multiple nREPL servers using <kbd >M-x cider-jack-in</kbd > (or
@@ -1054,56 +1104,6 @@ Don't worry if this looks intimidating. For most macros the indent spec should
10541104be either just a number, or one of the keywords ` :defn ` or ` :form ` . A full
10551105description of the spec is provided in [ Indent-Spec.md] ( Indent-Spec.md ) .
10561106
1057- ### Code reloading
1058-
1059- * ` cider-refresh ` wraps
1060- [ clojure.tools.namespace] ( https://github.com/clojure/tools.namespace ) , and as
1061- such the same
1062- [ benefits] ( https://github.com/clojure/tools.namespace#reloading-code-motivation )
1063- and
1064- [ caveats] ( https://github.com/clojure/tools.namespace#reloading-code-preparing-your-application )
1065- regarding writing reloadable code also apply.
1066-
1067- * Calling ` cider-refresh ` will cause all modified Clojure files on the classpath
1068- to be reloaded. You can also provide a single prefix argument to reload all
1069- Clojure files on the classpath unconditionally, or a double prefix argument to
1070- first clear the state of the namespace tracker before reloading.
1071-
1072- * The above three operations are analogous to
1073- [ ` clojure.tools.namespace.repl/refresh ` ] ( http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh ) ,
1074- [ ` clojure.tools.namespace.repl/refresh-all ` ] ( http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh-all )
1075- and
1076- [ ` clojure.tools.namespace.repl/clear ` ] ( http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/clear )
1077- (followed by a normal refresh), respectively.
1078-
1079- * You can define Clojure functions to be called before reloading, and after a
1080- successful reload, when using ` cider-refresh ` :
1081-
1082- ``` el
1083- (setq cider-refresh-before-fn "user/stop-system!"
1084- cider-refresh-after-fn "user/start-system!")
1085- ```
1086-
1087- * These must be set to the namespace-qualified names of vars bound to functions
1088- of no arguments. The functions must be synchronous (blocking), and are
1089- expected to be side-effecting - they will always be executed serially, without
1090- retries.
1091-
1092- * By default, messages regarding the status of the in-progress reload will be
1093- displayed in the echo area after you call ` cider-refresh ` . The same
1094- information will also be recorded in the ` *cider-refresh-log* ` buffer, along
1095- with anything printed to ` *out* ` or ` *err* ` by ` cider-refresh-before-fn ` and
1096- ` cider-refresh-start-fn ` .
1097-
1098- * You can make the ` *cider-refresh-log* ` buffer display automatically after you
1099- call ` cider-refresh ` by setting the ` cider-refresh-show-log-buffer ` variable
1100- to a non-nil value (this will also prevent any related messages from also
1101- being displayed in the echo area):
1102-
1103- ``` el
1104- (setq cider-refresh-show-log-buffer t)
1105- ```
1106-
11071107### Minibuffer completion
11081108
11091109Out-of-the box CIDER uses the standard ` completing-read ` Emacs mechanism. While it's not
0 commit comments