You are not logged in.

#1 2010-07-14 18:58:14

choogi
Member
Registered: 2009-10-06
Posts: 60

[SOLVED] Emacs-Haskell-Mode Garbage on First Load

I installed emacs-haskell-mode from pacman and I have this in my .emacs file:

(load-library "haskell-site-file")

haskell-site-file.el autoloads haskell-mode when I open a haskell file.  All works fine, but the very first time I open a haskell file (and load haskell-mode), this garbage gets spit out in my minibuffer:

#[nil "\300C\207"
      [t]
      2]

I've only been on emacs for a couple of months now and I've never seen that output before.  Haskell mode works fine as far as I can tell once it's loaded so the garbage output isn't causing any problems, but I'm just curious as to what it is and why it's there.

Last edited by choogi (2010-07-14 21:02:01)

Offline

#2 2010-07-14 20:56:55

richardmurri
Member
Registered: 2008-10-29
Posts: 39

Re: [SOLVED] Emacs-Haskell-Mode Garbage on First Load

If you're new to emacs, I don't expect you'd understand much lisp yet, but here is the answer:

When including haskell-mode the following is run.

(eval-when-compile
  ;; Emacs 21 defines `values' as a (run-time) alias for list.
  ;; Don't maerge this with the pervious clause.
  (if (string-match "values"
            (pp (byte-compile (lambda () (values t)))))
      (defsubst values (&rest values)
    values)))

See the line starting with 'pp'.   That basically says to pretty-print the value of the byte-compile.  It pretty prints to the echo area (what you refer to as the minibuffer).  If you eval the byte-compile you get the same value you're seeing.

This is a very long way to say that it's probably a bug.

Offline

#3 2010-07-14 21:01:46

choogi
Member
Registered: 2009-10-06
Posts: 60

Re: [SOLVED] Emacs-Haskell-Mode Garbage on First Load

Interesting, thanks for the response!

Offline

Board footer

Powered by FluxBB