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

Implement haskell-goto-first-error #1100

Merged
merged 3 commits into from
Jan 24, 2016

Conversation

bergey
Copy link
Contributor

@bergey bergey commented Jan 22, 2016

Supercedes #818


(defun insert-errors ()
(insert "import Control.Applicativ\nimport Data.Mayb\nimport Data.String")
(let ((a (make-overlay 18 36))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use re-search-forward and then (match-begin 0) and (match-end 0) to put the overlays. Should somebody come and need to change these tests they will be intimidated by character counting and won't do it.

@gracjan
Copy link
Contributor

gracjan commented Jan 22, 2016

Very nice! Please get rid of those hardcoded numbers and then we are good to merge.

@bergey bergey force-pushed the pr-haskell-goto-first-error branch from a4ee9aa to 6af7880 Compare January 22, 2016 22:18
@bergey
Copy link
Contributor Author

bergey commented Jan 22, 2016

@gracjan I force pushed the changes you requested.

(require 'haskell-load)

(defun insert-errors ()
(insert "import Control.Applicativ\nimport Data.Mayb\nimport Data.String")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more nitpick: Can I have one space here between import and module names?

Counting spaces might be intimidating for future developers, too.

- haskell-goto-next-error
- haskell-goto-prev-error
- haskell-goto-first-error
@bergey bergey force-pushed the pr-haskell-goto-first-error branch from 6af7880 to 788a70c Compare January 23, 2016 20:36
@bergey
Copy link
Contributor Author

bergey commented Jan 23, 2016

Makes sense. I started from real Haskell code, and the extra spaces are what stylish-haskell does. But they do make the tests harder to read otherwise. I force pushed again.

@gracjan gracjan changed the title Pr haskell goto first error Implement haskell-goto-first-error Jan 24, 2016
gracjan added a commit that referenced this pull request Jan 24, 2016
@gracjan gracjan merged commit a10a600 into haskell:master Jan 24, 2016
@gracjan
Copy link
Contributor

gracjan commented Jan 24, 2016

Perfect, thanks.

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.

3 participants