-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Package specifier is interpreted as start of new symbol in Common lisp. #656
Comments
I see what's going on. In which scenarios do you expect to have spaces? I have come up with the following cases, do you have more?
|
I don't really see the usecase for automatically inserting spaces. I press space iff I need to add another value/symbol/whatever. You're talking about |
Let me address this first: you can disable space auto-insertion by customizing I should have been more specific. I meant: in which cases do you (or anyone who wants smart spaces before colons) : and expect a space be added. In other words, without the space, this does not form a valid lisp syntax. After all, this should be the core reason why lispy implements the auto-spacing feature for certain punctuations in the first place. The current behavior for the auto-spacing is that unless the colon is at the function position or after characters such as "#", and I want to make lispy recognize more patterns where adding the space before colon is not desirable, like the scenario in your report.
I tested
Colons after CL charcter syntaxes re considered part of the character syntax. |
Great, thanks!
You probably did something wrong, because this should work. (cl:defpackage "1")
(cl:in-package "1")
(cl:defparameter exists cl:t)
;; 1::exists returns T
(cl:defpackage "2.3")
(cl:in-package "2.3")
(cl:defparameter exists cl:t)
;; 2.3::exists returns T |
Thanks for the example. So that rules out rule 1. Can you think of any possibilities that rule 2 is unwanted -- that is, it might be valid code without the space? If not, I will make a PR soonish™️ where the colon smart spacing consists of only rule 2 for common lisp. |
I cannot think of any, but I'm not that experienced with Common Lisp. |
Colon is package specifier, so
a:b
means the symbolb
exported from packagea
. This works for function calls, e.g.(a:b)
, but other places, pressing:
will insert a space(a:b c :d)
instead of(a:b c:d)
The text was updated successfully, but these errors were encountered: