Permalink
Browse files

(inferior-haskell-cabal-of-buf): Don't return

Ignore-this: ca3af0cb08646f18b325a3d56218c116
(inferior-haskell-cabal-of-buf): Don't return
a dead buffer.  Reported by Conal Elliott <conal@conal.net>.
(replace-regexp-in-string): Add XEmacs compatibility.

darcs-hash:20080704061752-c2f2e-d7bff4c6d8393bef27af265767fc377c67e68f70.gz
  • Loading branch information...
1 parent eb76499 commit 94ad4fc0bb6259cc7325e1df8467e75936b7d98d monnier committed Jul 4, 2008
Showing with 11 additions and 1 deletion.
  1. +6 −0 ChangeLog
  2. +5 −1 inf-haskell.el
View
6 ChangeLog
@@ -1,3 +1,9 @@
+2008-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * inf-haskell.el (inferior-haskell-cabal-of-buf): Don't return
+ a dead buffer. Reported by Conal Elliott <conal@conal.net>.
+ (replace-regexp-in-string): Add XEmacs compatibility.
+
2008-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
* haskell-font-lock.el (haskell-font-lock-symbols-alist): Change the
View
6 inf-haskell.el
@@ -57,6 +57,9 @@
(throw 'done f))
(file-already-exists t)))))))
+(unless (fboundp 'replace-regexp-in-string)
+ (defun replace-regexp-in-string (regexp rep string)
+ (replace-in-string string regexp rep)))
;; Here I depart from the inferior-haskell- prefix.
;; Not sure if it's a good idea.
@@ -247,7 +250,8 @@ The process PROC should be associated to a comint buffer."
(defun inferior-haskell-cabal-of-buf (buf)
(require 'haskell-cabal)
(with-current-buffer buf
- (or inferior-haskell-cabal-buffer
+ (or (and (buffer-live-p inferior-haskell-cabal-buffer)
+ inferior-haskell-cabal-buffer)
(and (not (local-variable-p 'inferior-haskell-cabal-buffer
;; XEmacs needs this argument.
(current-buffer)))

0 comments on commit 94ad4fc

Please sign in to comment.