-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
orchard.eldoc/extract-arglists
does not handle many special forms correctly
#165
Comments
quanticle
added a commit
to quanticle/orchard
that referenced
this issue
Jan 22, 2023
Fixes clojure-emacs#165. Currently, the eldoc args list for special forms includes the special form itself, which throws off the highlighting in Emacs' CIDER. This patch removes the special forms themselves from the args list. It specifically omits the Java interop special forms, because these, for some reason, do not include themselves in the :forms vector.
quanticle
added a commit
to quanticle/orchard
that referenced
this issue
Jan 22, 2023
Fixes clojure-emacs#165. Currently, the eldoc args list for special forms includes the special form itself, which throws off the highlighting in Emacs' CIDER. This patch removes the special forms themselves from the args list. It specifically omits the Java interop special forms, because these, for some reason, do not include themselves in the :forms vector.
quanticle
added a commit
to quanticle/orchard
that referenced
this issue
Jan 22, 2023
Fixes clojure-emacs#165. Currently, the eldoc args list for special forms includes the special form itself, which throws off the highlighting in Emacs' CIDER. This patch removes the special forms themselves from the args list. It specifically omits the Java interop special forms, because these, for some reason, do not include themselves in the :forms vector.
quanticle
added a commit
to quanticle/orchard
that referenced
this issue
Jan 27, 2023
Fixes clojure-emacs#165. Currently, the eldoc args list for special forms includes the special form itself, which throws off the highlighting in Emacs' CIDER. This patch removes the special forms themselves from the args list. To do this, the code first checks the `:special-form` property. If it is a special form, the code compares the `:name` property, which is the symbol representing the special form, with the first element of each of the lists in `:forms`. If the two are equal, that element is omitted.
quanticle
added a commit
to quanticle/orchard
that referenced
this issue
Jan 27, 2023
Fixes clojure-emacs#165. Currently, the eldoc args list for special forms includes the special form itself, which throws off the highlighting in Emacs' CIDER. This patch removes the special forms themselves from the args list. To do this, the code first checks the `:special-form` property. If it is a special form, the code compares the `:name` property, which is the symbol representing the special form, with the first element of each of the lists in `:forms`. If the two are equal, that element is omitted.
quanticle
added a commit
to quanticle/orchard
that referenced
this issue
Jan 27, 2023
Fixes clojure-emacs#165. Currently, the eldoc args list for special forms includes the special form itself, which throws off the highlighting in Emacs' CIDER. This patch removes the special forms themselves from the args list. To do this, the code first checks the `:special-form` property. If it is a special form, the code compares the `:name` property, which is the symbol representing the special form, with the first element of each of the lists in `:forms`. If the two are equal, that element is omitted.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is related to Cider bug #3307. It seems like the actual issue is that
extract-arglists
isn't correctly processing theforms
list for many Clojure special forms. When I runI get back
Note that
if
is the first element of the:eldoc
vector, which screws up the eldoc highlighting in emacs, because it expects the first element of the arglist to betest
, notif
itself.Similarly, when I get the info for
do
I get
Just like with
if
,do
is the first element of the:eldoc
vector, which, once again, throws off the eldoc highlighting in emacs.I got similar results with other special forms, such as,
def
andfn
. The only special form I didn't get this result with was.
:which returned
So it seems like
.
is a special special form. I would propose thatextract-arglists
make a special case for.
, and omit the first element when building the arglists for other special forms. I can make the change toeldoc.clj
, but I wanted to raise the issue in a bug first, in order to solicit feedback on whether my suggested approach is the best one.The text was updated successfully, but these errors were encountered: