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

clojure-find-def fails on symbols that contain special characters #637

Open
loganmhb opened this issue Oct 14, 2022 · 0 comments
Open

clojure-find-def fails on symbols that contain special characters #637

loganmhb opened this issue Oct 14, 2022 · 0 comments

Comments

@loganmhb
Copy link

I have a slightly unconventional def macro that looks like this:

(defn+ my-special-fn []
   (body))

Expected behavior

(clojure-find-def) with the pointer in that function should return ("defn+" "my-special-fn").

Actual behavior

It returns ("defn" "+").

This appears to be due to the use of the end-of-word matcher in clojure-def-type-and-name-regex, and is fixed by replacing that operator (\\>) with the end-of-symbol matcher instead (\\_>). I don't think this would break anything, but I am by no means an elisp regex expert. I can make a PR for this if you agree this should be the behavior.

Steps to reproduce the problem

Execute (clojure-find-def) while the pointer is in the above fn def.

Environment & Version information

clojure-mode version

clojure-mode (version 5.13.0)

Emacs version

27.2

Operating system

macOS Monterey

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

No branches or pull requests

1 participant