inferior-haskell-load-file breaks on buffers without a file

Deniz Dogan deniz.a.m.dogan at gmail.com
Thu Jan 21 09:34:32 EST 2010


The function inferior-haskell-load-file breaks when run in a buffer
without a file associated to it. It's trivial to "fix", so I won't
supply a patch for it. Just use something like:

(defun inferior-haskell-load-file (&optional reload)
  ;; [snip]
  (let ((buf (current-buffer))
        (file buffer-file-name)
	(proc (inferior-haskell-process)))
    ;; New "if" here!
    (if file
        (with-current-buffer (process-buffer proc)
          ;; [snip]
        )
      (error "No file associated with buffer"))))

Apologies for GMail messing with line breaks and such.

-- 
Deniz Dogan



More information about the Haskellmode-emacs mailing list