Skip to content

Commit 36a886b

Browse files
committed
Made cljr--whitespacep null safe
After removing s-blank? from s.el, just using string-blank-p wasn't null safe. Added the null check on Benedek Fazekas' prompting.
1 parent 6f1ca24 commit 36a886b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clj-refactor.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ list of (fn args) to pass to `apply''"
573573

574574
(defun cljr--whitespacep (s)
575575
"True if S contains only whitespace."
576-
(string-blank-p (string-trim s)))
576+
(or (null s) (string-blank-p (string-trim s))))
577577

578578
(defun cljr--make-room-for-toplevel-form ()
579579
(if (cljr--whitespacep (buffer-substring-no-properties (point) (point-max)))

0 commit comments

Comments
 (0)