Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove duplicated function from haskell-cabal.

  • Loading branch information...
commit da11692023a6e1d954b8dd0b0feb44690f356f0a 1 parent 0a79ab8
Chris Done authored May 19, 2012

Showing 1 changed file with 1 addition and 26 deletions. Show diff stats Hide diff stats

  1. 27  haskell-cabal.el
27  haskell-cabal.el
@@ -100,32 +100,7 @@
100 100
 ;; (defsubst* inferior-haskell-string-prefix-p (str1 str2)
101 101
 ;;   "Return non-nil if STR1 is a prefix of STR2"
102 102
 ;;   (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
103  
-
104  
-(defun haskell-cabal-find-file ()
105  
-  "Return a buffer visiting the cabal file of the current directory, or nil."
106  
-  (catch 'found
107  
-    ;; ;; First look for it in haskell-cabal-buffers.
108  
-    ;; (dolist (buf haskell-cabal-buffers)
109  
-    ;;   (if (inferior-haskell-string-prefix-p
110  
-    ;;        (with-current-buffer buf default-directory) default-directory)
111  
-    ;;       (throw 'found buf)))
112  
-    ;; Then look up the directory hierarchy.
113  
-    (let ((user (nth 2 (file-attributes default-directory)))
114  
-          ;; Abbreviate, so as to stop when we cross ~/.
115  
-          (root (abbreviate-file-name default-directory))
116  
-          files)
117  
-      (while (and root (equal user (nth 2 (file-attributes root))))
118  
-        (if (setq files (directory-files root 'full "\\.cabal\\'"))
119  
-            ;; Avoid the .cabal directory.
120  
-            (dolist (file files (throw 'found nil))
121  
-              (unless (file-directory-p file)
122  
-                (throw 'found (find-file-noselect file))))
123  
-          (if (equal root
124  
-                     (setq root (file-name-directory
125  
-                                 (directory-file-name root))))
126  
-              (setq root nil))))
127  
-      nil)))
128  
-
  103
+4
129 104
 (autoload 'derived-mode-p "derived")	; Emacs 21
130 105
 
131 106
 (defun haskell-cabal-buffers-clean (&optional buffer)

0 notes on commit da11692

Please sign in to comment.
Something went wrong with that request. Please try again.