Skip to content

Fix clojure-find-ns when there's a ns form inside a string #519

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

Merged
merged 2 commits into from
Mar 25, 2019
Merged

Conversation

Malabarba
Copy link
Member

@Malabarba Malabarba commented Mar 23, 2019

Replace this placeholder text with a summary of the changes in your PR.


Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):

  • The commits are consistent with our contribution guidelines.
  • You've added tests (if possible) to cover your change(s). Bugfix, indentation, and font-lock tests are extremely important!
  • You've run M-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

clojure-mode.el Outdated
(and (goto-char (point-min))
(re-search-forward clojure-namespace-name-regex nil t)))
(match-string-no-properties 4))))))
(let* ((ns (save-excursion
Copy link
Member

Choose a reason for hiding this comment

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

Seems to me a regular let would do here.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

clojure-mode.el Outdated
@@ -1886,6 +1886,19 @@ the cached value will be updated automatically."
(defvar-local clojure-cached-ns nil
"A buffer ns cache used to speed up ns-related operations.")

(defun clojure--find-ns-in-direction (dir)
Copy link
Member

Choose a reason for hiding this comment

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

Every time I see dir I think of directory, but that's not a big deal. It's a good idea to extract this.

Copy link
Member Author

Choose a reason for hiding this comment

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

No reason to be lazy anyway. Changed it to direction.

@bbatsov bbatsov merged commit e898a94 into master Mar 25, 2019
@bbatsov bbatsov deleted the fix-ns branch March 25, 2019 06:29
@bbatsov
Copy link
Member

bbatsov commented Mar 25, 2019

Thanks!

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