Permalink
Browse files

(inferior-haskell-load-file): Save buffer before using buffer-file-name.

Ignore-this: 7bfeafa87631a16ef3c3d23f3f063ffc

darcs-hash:20070504002016-c2f2e-87e1bd741516b4629d255a6785c820c4c815d5f5.gz
  • Loading branch information...
1 parent 8b93c1d commit 2eaced432a78abcfad235cc3dee9c04231ef548c monnier committed May 4, 2007
Showing with 7 additions and 1 deletion.
  1. +5 −0 ChangeLog
  2. +2 −1 inf-haskell.el
View
@@ -1,3 +1,8 @@
+2007-05-03 "David House" <dmhouse@gmail.com> (tiny change)
+
+ * inf-haskell.el (inferior-haskell-load-file): Save buffer before
+ using buffer-file-name.
+
2007-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
* haskell-mode.el (haskell-hoogle-command, haskell-hoogle): New var
View
@@ -176,9 +176,10 @@ The process PROC should be associated to a comint buffer."
(defun inferior-haskell-load-file (&optional reload)
"Pass the current buffer's file to the inferior haskell process."
(interactive)
+ ;; Save first, so we're sure that `buffer-file-name' is non-nil afterward.
+ (save-buffer)
(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)

0 comments on commit 2eaced4

Please sign in to comment.