Skip to content

Check string-match argument type in haskell-do-try-info and haskell-do-try-type #602

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

Closed
wants to merge 2 commits into from

Conversation

antalsz
Copy link
Contributor

@antalsz antalsz commented Apr 25, 2015

In haskell-do-try-info and haskell-do-try-type, there is code of the form (string-match "^[A-Za-z_]" (cdr state)) that didn't check (stringp (cdr state)). This messed up my Emacs's connection to the *haskell* buffer when hitting space would sometimes cause an error. Checking that string-match can apply to (cdr state) seems to have fixed this, though.

In `haskell-do-try-info` and `haskell-do-try-type`, there is code of the
form `(string-match "^[A-Za-z_]" (cdr state))` that didn't check
`(stringp (cdr state))`.
@gracjan
Copy link
Contributor

gracjan commented Apr 25, 2015

@antalsz: Are you trying to solve the same issue as #601?

If so please read the comments down there and try to fix the core of the problem.

@antalsz
Copy link
Contributor Author

antalsz commented Apr 25, 2015

@gracjan: Oops, sorry I missed that. (And deviant-logic balanced their parentheses correctly the first time!) Yes, it's the same bugfix, just in two functions and with a more localized check. I can take a look, although deep elisp hackery isn't my strong suit.

antalsz referenced this pull request in antalsz/haskell-mode Apr 25, 2015
The documentation mandates that `haskell-ident-at-point` return nil when
there is no identifier at point; however, apparently, it instead
returned `""` in that case at some point, and so some code made faulty
assumptions based on that.
@gracjan
Copy link
Contributor

gracjan commented Apr 25, 2015

If I understand correctly this was subsumed by #603, right?

@gracjan gracjan closed this Apr 25, 2015
@antalsz antalsz deleted the pr-check-strings branch April 25, 2015 18:09
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