Skip to content

Commit

Permalink
add a check
Browse files Browse the repository at this point in the history
urgggh... I hate elisp sometimes. symbol-name returns "nil" if you pass
nil to it and throws an error if you give it something like an empty
string. And there's no cond-> macro in elisp.
  • Loading branch information
agzam committed Nov 16, 2023
1 parent 3e11c1e commit 035f970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neil.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ the dependency to the project (deps.edn only)."
"Search for Clojure libs: "
(when (member (file-name-nondirectory (buffer-file-name))
'("deps.edn" "project.clj"))
(symbol-name (symbol-at-point))))))
(when-let ((sym (symbol-at-point)))
(symbol-name sym))))))
(let* ((format-dep-str
(lambda (lib-name version)
(let ((build-tool (car (neil--identify-project-build-tool))))
Expand Down

0 comments on commit 035f970

Please sign in to comment.