[Haskell-cafe] Using rebox2 (emacs) with Haskell

Henry Laxen nadine.and.henry at pobox.com
Mon Mar 21 02:40:02 UTC 2016


If any of you have tried using rebox2 with haskell, you've discovered that it 
does not have a built in Haskell comment mode.  I was looking for something 
like this:

-------------------------------------
-- You can put a nice comment here --
-- and surround with a pretty box  --
-------------------------------------

Actually, it is easy to set this up with a few lines in your .emacs file.  
Here is what you need:

(require 'rebox2)
(add-to-list 'rebox-language-character-alist '(7 . "-"))
(setq rebox-style-loop '(725))
(rebox-register-all-templates)
(add-hook 'haskell-mode-hook 'rebox-mode)

Then just type Meta-q if you want to refill the comment, and Meta-Q if you 
don't want to refill.  I hope this is helpful.
Best wishes,
Henry Laxen



More information about the Haskell-Cafe mailing list