@@ -246,90 +246,93 @@ to `clojure-mode`.
246
246
247
247
### Threading macros related features
248
248
249
- * Thread another expression.
249
+ ` clojure-thread ` : Thread another form into the surrounding thread. Both ` ->> `
250
+ and ` -> ` variants are supported.
250
251
251
- Thread another form into the surrounding thread. Both ` ->> ` and ` -> ` variants
252
- are supported. See demonstration on the
253
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-thread ) .
252
+ <img width =" 512 " src =" /doc/clojure-thread.gif " >
254
253
255
- * Unwind a threaded expression.
254
+ ` clojure-unwind ` : Unwind a threaded expression. Supports both ` ->> ` and ` -> ` .
256
255
257
- Supports both ` ->> ` and ` -> ` . See demonstration on the
258
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-unwind-thread ) .
256
+ <img width =" 512 " src =" /doc/clojure-unwind.gif " >
259
257
260
- * Wrap in thread first (` -> ` ) and fully thread.
258
+ ` clojure-thread-first-all ` : Introduce the thread first macro (` -> ` ) and rewrite
259
+ the entire form. With a prefix argument do not thread the last form.
261
260
262
- Introduce the thread first macro and rewrite the entire form. With a prefix
263
- argument do not thread the last form. See demonstration on the
264
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-thread-first-all ) .
261
+ <img width =" 512 " src =" /doc/clojure-thread-first-all.gif " >
265
262
266
- * Wrap in thread last (` ->> ` ) and fully thread.
263
+ ` clojure-thread-last-all ` : Introduce the thread last macro and rewrite the
264
+ entire form. With a prefix argument do not thread the last form.
267
265
268
- Introduce the thread last macro and rewrite the entire form. With a prefix
269
- argument do not thread the last form. See demonstration on the
270
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-thread-last-all ) .
266
+ <img width =" 512 " src =" /doc/clojure-thread-last-all.gif " >
271
267
272
- * Fully unwind a threaded expression.
268
+ ` clojure-unwind-all ` : Fully unwind a threaded expression removing the threading
269
+ macro.
273
270
274
- Unwind and remove the threading macro. See demonstration on the
275
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-unwind-all ) .
271
+ <img width =" 512 " src =" /doc/clojure-unwind-all.gif " >
276
272
277
273
### Cycling things
278
274
279
- * Cycle privacy
275
+ ` clojure-cycle-privacy ` : Cycle privacy of ` def ` s or ` defn ` s. Use metadata
276
+ explicitly with setting ` clojure-use-metadata-for-privacy ` to ` t ` for ` defn ` s
277
+ too.
280
278
281
- Cycle privacy of ` def ` s or ` defn ` s. Use metadata explicitly with setting
282
- ` clojure-use-metadata-for-privacy ` to ` t ` for ` defn ` s too. See demonstration
283
- on the [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-cycle-privacy ) .
279
+ <img width =" 512 " src =" /doc/clojure-cycle-privacy.gif " >
284
280
285
- * Cycle if/if- not
281
+ ` clojure-cycle-not ` : Add or remove a ` not ` form around the current form.
286
282
287
- Find the closest if or if-not up the syntax tree and toggle it.
288
- Also transpose the "else" and "then" branches, keeping the semantics
289
- the same as before. See demonstration on the [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-cycle-if ) .
283
+ <img width =" 512 " src =" /doc/clojure-cycle-not.gif " >
284
+
285
+ ` clojure-cycle-when ` : Find the closest ` when ` or ` when-not ` up the syntax tree
286
+ and toggle it.
287
+
288
+ <img width =" 512 " src =" /doc/clojure-cycle-when.gif " >
289
+
290
+ ` clojure-cycle-if ` : Find the closest ` if ` or ` if-not ` up the syntax tree and
291
+ toggle it. Also transpose the ` else ` and ` then ` branches, keeping the semantics
292
+ the same as before.
293
+
294
+ <img width =" 512 " src =" /doc/clojure-cycle-if.gif " >
290
295
291
296
### Convert collection
292
297
293
298
Convert any given collection at point to list, quoted list, map, vector or set.
294
299
295
300
### Let expression
296
301
297
- * Introduce let
302
+ ` clojure-introduce-let ` : Introduce a new ` let ` form. Put the current form into
303
+ its binding form with a name provided by the user as a bound name. If called
304
+ with a numeric prefix put the let form Nth level up in the form hierarchy.
298
305
299
- Introduce a new let form. Put the current form into its binding form with
300
- a name provided by the user as a bound name. If called with a numeric prefix
301
- put the let form Nth level up in the form hierarchy. See demonstration on the
302
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-introduce-let ) .
306
+ <img width =" 512 " src =" /doc/clojure-introduce-let.gif " >
303
307
304
- * Move to let
308
+ ` clojure-move-to-let ` : Move the current form to the closest ` let ` 's binding
309
+ form. Replace all occurrences of the form in the body of the let.
305
310
306
- Move the current form to the closest let's binding form. Replace
307
- all occurrences of the form in the body of the let. See demonstration on the
308
- [ clj-refactor.el wiki] ( https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-move-to-let ) .
311
+ <img width =" 512 " src =" /doc/clojure-move-to-let.gif " >
309
312
310
- * Forward slurp form into let
313
+ ` clojure-let-forward-slurp-sexp ` : Slurp the next form after the ` let ` into the
314
+ ` let ` . Replace all occurrences of the bound forms in the form added to the ` let `
315
+ form. If called with a prefix argument slurp the next n forms.
311
316
312
- Slurp the next form after the let into the let. Replace all occurrences
313
- of the bound forms in the form added to the let form. If called with
314
- a prefix argument slurp the next n forms.
317
+ <img width =" 512 " src =" /doc/clojure-let-forward-slurp-sexp.gif " >
315
318
316
- * Backward slurp form into let
319
+ ` clojure-let-backward-slurp-sexp ` : Slurp the form before the ` let ` into the
320
+ ` let ` . Replace all occurrences of the bound forms in the form added to the ` let `
321
+ form. If called with a prefix argument slurp the previous n forms.
317
322
318
- Slurp the form before the let into the let. Replace all occurrences
319
- of the bound forms in the form added to the let form. If called with
320
- a prefix argument slurp the previous n forms.
323
+ <img width =" 512 " src =" /doc/clojure-let-backward-slurp-sexp.gif " >
321
324
322
325
` paredit-convolute-sexp ` is advised to replace occurrences of bound forms with their bound names when convolute is used on a let form.
323
326
324
327
### Rename ns alias
325
328
326
- Rename an alias inside a namespace declaration.
329
+ ` clojure-rename-ns-alias ` : Rename an alias inside a namespace declaration.
327
330
328
331
<img width =" 512 " src =" /doc/clojure-rename-ns-alias.gif " >
329
332
330
333
### Add arity to a function
331
334
332
- Add a new arity to an existing single-arity or multi-arity function.
335
+ ` clojure-add-arity ` : Add a new arity to an existing single-arity or multi-arity function.
333
336
334
337
<img width =" 512 " src =" /doc/clojure-add-arity.gif " >
335
338
0 commit comments