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

Fix error in cider-clojuredocs-lookup #3163

Closed
wants to merge 1 commit into from
Closed

Fix error in cider-clojuredocs-lookup #3163

wants to merge 1 commit into from

Conversation

benjamin-asdf
Copy link
Contributor

Issue:
cider-clojuredocs pops the doc buffer
but then still asks you for a symbol.

The issue is that
cider-clojuredocs-lookup passes nil to highlight-regexp,
which then throws an error.
It's only an issue when sym doesn't have a /.

and upstream cider-try-symbol-at-point handles all errors with
asking for a symbol.

Also sym can be something like . at this point so calling regexp-quote makes sense.

Issue:
cider-clojuredocs pops the doc buffer
but then still asks you for a symbol.
Maybe only with emacs master highlight-regexp
might have changed.

The issue is that
cider-clojuredocs-lookup passes nil to highlight-regexp,
which then throws an error.

and cider-try-symbol-at-point handles all errors with
asking for a symbol.
(highlight-regexp
(regexp-quote
(or (cadr (split-string sym "/"))
sym))
Copy link
Member

Choose a reason for hiding this comment

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

Could be desirable to extract this one to defun and then unit-test it

@vemv vemv closed this in 427360e Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants