Personal tools

Talk:Haskell mode for Emacs

From HaskellWiki

Jump to: navigation, search

I have installed a fresh "sumo" version of XEmacs for Windows XP (version 21.4.19, from the xemacs.org site itself) and have updated its packages, as well. Apparently, the XEmacs people have included the fixes to haskell-indent.el and haskell-font-lock.el you mention here, which is good; but nevertheless when I try to load up haskell-mode, XEmacs bombs with the unhelpful message "Symbol's function definition is void: charsetp".

Do you have any hints on how to correct this problem?

That's a bit thorny isn't it? "charsetp" is supposed to be defined in Xemacs21 - it just tells if something is a charset object. However, the only place i see it being used in the Haskell mode code is in haskell-font-lock.el, line 135 in my version. You could just comment out the entire sequence that uses it Lines 135 through 141 and part of line 126. The revised code would like like: (replaces lines 115 to 143)
(defcustom haskell-font-lock-symbols nil
  "Display \\ and -> and such using symbols in fonts.
This may sound like a neat trick, but be extra careful: it changes the
alignment and can thus lead to nasty surprises w.r.t layout.
If t, try to use whichever font is available.  Otherwise you can
set it to a particular font of your preference among `japanese-jisx0208'
and `unicode'."
  :group 'haskell
  :type '(choice (const nil)
	         (const t)
	         (const unicode)
          )

(defconst haskell-font-lock-symbols-alist
  (append
   ;; Prefer single-width Unicode font for lambda.
   (and (fboundp 'decode-char)
	(memq haskell-font-lock-symbols '(t unicode))
	(list (cons "\\" (decode-char 'ucs 955))))
   ;; The symbols can come from a JIS0208 font.
  ;; (and (fboundp 'make-char) (charsetp 'japanese-jisx0208)
;;	(memq haskell-font-lock-symbols '(t japanese-jisx0208))
;;	(list (cons "not" (make-char 'japanese-jisx0208 34 76))
;;	      (cons "\\" (make-char 'japanese-jisx0208 38 75))
;;	      (cons "->" (make-char 'japanese-jisx0208 34 42))
;;	      (cons "<-" (make-char 'japanese-jisx0208 34 43))
;;	      (cons "=>" (make-char 'japanese-jisx0208 34 77))))
   ;; Or a unicode font.
   (and (fboundp 'decode-char)
BrettGiles 02:16, 25 April 2007 (UTC)

Thank you for your advice: it worked fully. One thing, however: you should change line 126 to two closing parentheses, not one as you note above. Tamayo 19:30, 27 April 2007 (UTC)

I also needed to erase haskell-font-lock.elc file for the fix to start working. Ilya_Sigalov 11 January 209

1 Haskell-mode link dead.

The provided link to haskellmode leads to a empty directory. Maye a alternate location like this github-mirror should be provided:

http://trac.haskell.org/haskellmode-emacs

Maybe someone who know about the state of haskell mode could provide some more information

--Navigium 12:08, 9 February 2011 (UTC)

The link is down because the projects.haskell.org site was hacked, according to someone in #haskell. They say they are working to get it back up. Massysett 20:32, 9 February 2011 (UTC)

2 haskell-mode-exts

The haskell-mode-exts project by Chris Done cannot be found. The project below was the first result for "haskell-mode-exts" on github.

https://github.com/pheaver/haskell-mode-exts