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

Add bindings to navigates defun in Haskell #3811

Closed
wants to merge 1 commit into from
Closed

Add bindings to navigates defun in Haskell #3811

wants to merge 1 commit into from

Conversation

PierreR
Copy link
Contributor

@PierreR PierreR commented Nov 14, 2015

No description provided.

@bmag
Copy link
Contributor

bmag commented Nov 14, 2015

Note: if/when #2747 is merged, then M-h and M-l will provide the same movements.

@syl20bnr
Copy link
Owner

These are generic functions of Emacs, it feels weird to define them only for Haskell.

@PierreR
Copy link
Contributor Author

PierreR commented Nov 27, 2015

Yep, I have actually asked on the IRC channel which bindings I should use but I haven't received any definitive answer.
It might make sense to make them on SPC-m because AFAIK it is not always implemented by every mode. But sure the binding should be consistent across modes that support the feature.

@d12frosted
Copy link
Contributor

Shouldn't it be closed? :)

@PierreR
Copy link
Contributor Author

PierreR commented Mar 3, 2016

Well so what's the current bindings general or not for this feature ?

@d12frosted
Copy link
Contributor

Yeah, these are really built-in Emacs functions so it's better to map them in every prog mode.

But there's one strange thing. Definition of end-of-defun says that an end of a defun occurs right after the close-parenthesis that matches the open-parenthesis that starts a defun. So it should not even work for haskell-mode. And this is what I experience - instead of navigating between function definitions, it just jumps to beginning or end of module. But it works great for c-like and lisp-like languages.

I wonder if such behaviour is observable only in Emacs 25, hence you sent this PR to add useful key bindings.

@gracjan
Copy link

gracjan commented Aug 7, 2016

Haskell mode has those functions defined to support Haskell syntax. (right now this is a bit buggy and is disabled by default).

Surely this is generic Emacs functionality and does not have much to do with Haskell specifically.

@TheBB
Copy link
Contributor

TheBB commented Jun 7, 2017

Agree with the above discussion, it would be preferable to do this in a more generic way.

@TheBB TheBB closed this Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants