Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of s.el as a dependency #372

Merged
merged 31 commits into from
May 2, 2017
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
da35e4b
Replaced s-join with string-join
dotemacs Apr 25, 2017
7a06913
Replaced s-trim with string-trim
dotemacs Apr 25, 2017
38d081a
Replaced s-blank? with string-blank-p
dotemacs Apr 25, 2017
4b47d41
Replaced s-concat with concat
dotemacs Apr 25, 2017
46f2a2f
Replace s-starts-with-p with string-prefix-p
dotemacs Apr 25, 2017
5c116f5
Replace s-(suf|pre)fix-p with string-(suf|pre)fix-p
dotemacs Apr 25, 2017
43e229d
Replaces s-equals-p with string-equal
dotemacs Apr 25, 2017
a380f8e
Replaced s-ends-with-p with string-suffix-p
dotemacs Apr 25, 2017
435615e
Replaced s-replace
dotemacs Apr 25, 2017
11c1d78
Replaced s-matches-p
dotemacs Apr 25, 2017
5ca4263
cljr--project-dir returns blank string instead of nil
dotemacs Apr 25, 2017
6d0eaa3
Remove s-chop-(pre|suf)fix with string-remove-(pre|suf)fix
dotemacs Apr 25, 2017
84892b0
Removed s-(pre|ap)pend
dotemacs Apr 25, 2017
209bd74
Switch to downcase from s-downcase
dotemacs Apr 25, 2017
a7a983a
Remove s-present?
dotemacs Apr 25, 2017
5a3b3cc
Replaced s-split with split-string
dotemacs Apr 25, 2017
d3d3223
Replaced s-contains-p
dotemacs Apr 26, 2017
cb32710
Replace s-match
dotemacs Apr 26, 2017
df7c4f1
Replace s-dashed-words
dotemacs Apr 27, 2017
3504f9e
Replaced s-with
dotemacs Apr 27, 2017
e0c0ac6
Replace s-slice-at
dotemacs Apr 27, 2017
315d517
Less parens
dotemacs Apr 27, 2017
c1efb08
Remove s-lines
dotemacs Apr 27, 2017
4a10aea
Removed s.el as a dependency
dotemacs Apr 27, 2017
e812312
Created cljr--string-present-p
dotemacs May 1, 2017
1641730
Reused cljr--string-present-p
dotemacs May 1, 2017
80d7fd4
Cleaning up the intent
dotemacs May 1, 2017
01cf772
Fix for the omission with split-string
dotemacs May 1, 2017
e04912f
Made cljr--whitespacep null safe
dotemacs May 1, 2017
c02c15f
Let diet
dotemacs May 1, 2017
c33fc5f
Avoiding repetition
dotemacs May 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions clj-refactor.el
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ list of (fn args) to pass to `apply''"

(defun cljr--whitespacep (s)
"True if S contains only whitespace."
(s-blank? (string-trim s)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

essential difference between s-blank? and string-blank-p that former is null safe latter is not. I don't think that causes any problem in this commit but you might want to dblcheck that..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, added the null safety with 36a886b

(string-blank-p (string-trim s)))

(defun cljr--make-room-for-toplevel-form ()
(if (cljr--whitespacep (buffer-substring-no-properties (point) (point-max)))
Expand Down Expand Up @@ -1932,7 +1932,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-project-clean"
(defun cljr--empty-buffer-p (&optional buffer)
(let ((buffer (or buffer (current-buffer))))
(with-current-buffer buffer
(s-blank? (string-trim (buffer-substring-no-properties (point-min) (point-max)))))))
(string-blank-p (string-trim (buffer-substring-no-properties (point-min) (point-max)))))))

(defun cljr--extract-next-dependency-name ()
(while (not (or (cljr--empty-buffer-p)
Expand Down Expand Up @@ -2882,7 +2882,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-extract-function
(insert "(")
(when name (insert name))
(save-excursion
(unless (s-blank? unbound)
(unless (string-blank-p unbound)
(insert " " unbound))
(insert ")"))
(unless name
Expand Down Expand Up @@ -2915,7 +2915,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-stubs"
(let* ((interface (cider-symbol-at-point))
(prefix? (cljr--symbol-prefix interface))
(alias? (cljr--resolve-alias prefix?))
(interface (if (not (s-blank? prefix?))
(interface (if (not (string-blank-p prefix?))
(if alias?
(format "%s/%s" alias? (cljr--symbol-suffix interface))
interface)
Expand Down