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

Package HaRe elisp on MELPA #2

Open
alanz opened this issue Oct 6, 2015 · 1 comment
Open

Package HaRe elisp on MELPA #2

alanz opened this issue Oct 6, 2015 · 1 comment
Labels

Comments

@alanz
Copy link
Collaborator

alanz commented Oct 6, 2015

Originally https://github.com/alanz/HaRe/issues/12

@alanz alanz added the elisp label Oct 6, 2015
@alanz
Copy link
Collaborator Author

alanz commented Oct 6, 2015

Comment on original by @purcell

Yep. Here's what you'll need to do to prepare the code itself:

  • Make sure the boilerplate is parseable by package.el. If in doubt, enable auto-insert-mode and let it help you create a fresh hare.el, then paste the code into it. Test with M-: (package-buffer-info).
  • Use a consistent prefix for all identifiers. So ghc-hare-command => hare-ghc-command, erlang-xemacs-p => hare-erlang-xemacs-p, refac-result => hare-refac-result etc.
  • Rename read-char-spec.el to hare-read-char-spec.el, or inline it in hare.el
  • Move your provide form to the bottom, before the ;;; hare.el ends here comment which auto-insert-mode will add
  • Add a ;; Package-Requires: header to specify a dependency on haskell-mode, e.g. ;; Package-Requires ((haskell-mode "13.10")).
  • Remove all the messy commented-out code referring to erlang, distel etc.

Regarding the way the code works, the hare-init code is a bit hacky, since it directly modifies haskell-mode-map. What you want instead is to define a minor mode hare-mode, and add the keybindings to the resulting hare-mode-map. Then users can just enable hare-mode in their haskell-mode-hook.

Hope that helps.

-Steve

alanz referenced this issue in alanz/HaRe Jul 22, 2017
robrix referenced this issue in robrix/HaRe Aug 19, 2017
alanz referenced this issue in alanz/HaRe Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant