File tree 2 files changed +12
-1
lines changed 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## 2.3.1
4
4
5
+ - [ #384 ] ( https://github.com/clojure-emacs/clj-refactor.el/issues/384 ) Add ` cljr-auto-sort-project-dependencies ` .
5
6
- [ #363 ] ( https://github.com/clojure-emacs/clj-refactor.el/issues/363 ) cljr-favor-prefix-notation by default is set to false
6
7
- Display keymap bindings in documentation for minor mode
7
8
- New config setting ` cljr-libspec-whitelist ` to prevent libspecs which appear unused but are side-effecting at load from being pruned.
Original file line number Diff line number Diff line change 58
58
:group 'cljr
59
59
:type 'boolean )
60
60
61
+ (defcustom cljr-auto-sort-project-dependencies nil
62
+ " If t, sort project dependencies after any command that changes them."
63
+ :group 'cljr
64
+ :type 'boolean )
65
+
61
66
(defcustom cljr-magic-requires t
62
67
" Whether to automatically require common namespaces when they are used.
63
68
These are the namespaces listed in `cljr-magic-require-namespaces' .
@@ -2172,6 +2177,10 @@ possible choices. If the choice is trivial, return it."
2172
2177
(paredit-backward-down)
2173
2178
(cljr-hotload-dependency))))
2174
2179
2180
+ (defun cljr--maybe-sort-project-dependencies ()
2181
+ (when cljr-auto-sort-project-dependencies
2182
+ (cljr-sort-project-dependencies)))
2183
+
2175
2184
;;;### autoload
2176
2185
(defun cljr-add-project-dependency (force )
2177
2186
" Add a dependency to the project.clj file.
@@ -2183,7 +2192,8 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-project-depe
2183
2192
(cljr--prompt-user-for " Artifact: " )))
2184
2193
(version (thread-last (cljr--get-versions-from-middleware lib-name)
2185
2194
(cljr--prompt-user-for " Version: " ))))
2186
- (cljr--add-project-dependency lib-name version)))
2195
+ (cljr--add-project-dependency lib-name version)
2196
+ (cljr--maybe-sort-project-dependencies)))
2187
2197
2188
2198
;;;### autoload
2189
2199
(defun cljr-update-project-dependency ()
You can’t perform that action at this time.
0 commit comments