-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
# is symbol instead of being a prefix #394
Comments
We need to check the proper meaning of these things in order to do them right thing. What's the difference between a prefix character and a symbol character with the prefix flag? Could someone find this section on the elisp manual? |
I'm guessing we're talking about this section - https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Class-Table.html |
To quote:
That definition is not very helpful in our case as it doesn't say if those characters are also part of the symbols or not. In elisp prefix characters are never part of the symbol ( In clojure A more complicated case is that of #?(:clj Double/NaN
:cljs js/NaN
:default nil) So even if this issues is fixed smartparents wont be working correctly for conditional prefixes (Fuco1/smartparens#621) but at least it will be working for all others. It's worth pointing out that elisp has similar problem with |
The change I made very well could have been incorrect. I believe the reason I made it was because forward slurping and navigating were working an a way that I found weird with something like If it should be changed, then I have no objection. |
@vspinu Feel free to make the necessary change. |
Actually there is a special
|
? must be treated as a symbol inside symbols but as a prefix within conditional prefixes like #? and #?@.
I have no idea what this is supposed to mean
In either case, I should probably add some logic to smartparens to work with this (presumably new) flag. That would simplify the regexp hack we use now for the prefixes which aren't syntactically marked. |
? must be treated as a symbol inside symbols but as a prefix within conditional prefixes like #? and #?@.
I've just added support for the Would you be interested in writing a patch for clojure mode so we can remove the kludge code from smartparens? It seems you've already solved some of the cases. |
Does this mean that if all characters in a sequence are marked as prefix, smartparens should work as expected? That is, skip all those when needed?
Sure. I will have a look. |
@vspinu My understanding is that they should be treated as a prefix only if they start the symbol. So any mix of characters in class If they are in the middle of a symbol, they should be part of that symbol (I'm now not entirely sure I did implement this part correctly :D I will check). |
#
is heavily used as prefix in clojure. Treating it as symbol causes problems with navigation that assumes prefix behavior for such symbols (Fuco1/smartparens#621).The line of concern is this one introduced in f6b01fc. From the inline doc and commit message it's not clear why
#
should be different from other prefix symbols@'~
.The text was updated successfully, but these errors were encountered: