Skip to content

Commit a055eb3

Browse files
committed
Remove dependency on dash.el and s.el in new function
1 parent 63eccf7 commit a055eb3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

clj-refactor.el

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3359,10 +3359,13 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-create-fn-from-e
33593359
(cljr--insert-example-fn fn-name args path))))
33603360

33613361
(defun cljr--inflect-last-word (f s)
3362-
(let* ((words (s-split "-" s))
3363-
(last-word (-last-item words))
3364-
(prefix (-butlast words)))
3365-
(s-join "-" (-concat prefix (list (funcall f last-word))))))
3362+
(save-match-data
3363+
(let* ((words (split-string s "-"))
3364+
(last-word (car (last words)))
3365+
(prefix (butlast words)))
3366+
(mapconcat 'identity
3367+
(append prefix (list (funcall f last-word)))
3368+
"-"))))
33663369

33673370
(defun cljr--create-fn-from-list-fold (args path)
33683371
(cljr--insert-example-fn (car args)

0 commit comments

Comments
 (0)