Package: haskell-mode Version: 2.1-1 Using C-c C-l (inferior-haskell-load-file) on a buffer that doesn't have a buffer-file-name (like *scratch*) fails.
Steps to reproduce: * C-x b *scratch* RET * M-x haskell-mode RET * Type some Haskell code * C-c C-l Output from GHCi: Prelude> :load "" <command line>: Could not find module `': Use -v to see a list of the files searched for. Failed, modules loaded: none. Fix: patch attached. We just need to (save-buffer) before we try to grab the buffer-file-name. -- -David House, [EMAIL PROTECTED]
*** /usr/local/share/emacs/site-lisp/haskell-mode-2.3/inf-haskell-mine.el 2007-04-29 15:29:12.000000000 +0100 --- /usr/local/share/emacs/site-lisp/haskell-mode-2.3/inf-haskell.el 2007-04-29 15:28:57.000000000 +0100 *************** *** 176,184 **** (defun inferior-haskell-load-file (&optional reload) "Pass the current buffer's file to the inferior haskell process." (interactive) - (save-buffer) (let ((file buffer-file-name) (proc (inferior-haskell-process))) (with-current-buffer (process-buffer proc) ;; Not sure if it's useful/needed and if it actually works. ;; (unless (equal (file-name-as-directory default-directory) --- 176,184 ---- (defun inferior-haskell-load-file (&optional reload) "Pass the current buffer's file to the inferior haskell process." (interactive) (let ((file buffer-file-name) (proc (inferior-haskell-process))) + (save-buffer) (with-current-buffer (process-buffer proc) ;; Not sure if it's useful/needed and if it actually works. ;; (unless (equal (file-name-as-directory default-directory)