Permalink
Browse files

(inferior-haskell-compute-module-alist): Fix regexps.

Ignore-this: 985ae139910230c603b8a50cb62d5fa7
(inferior-haskell-compute-module-alist): Fix regexps.
(inferior-haskell-module-alist-file): Thinko.

darcs-hash:20070629201609-c2f2e-0c1ef496a66880cce41342442458cc9dccfc7707.gz
  • Loading branch information...
1 parent 3afdf6b commit bf80267190b9f8be579932e9bd7f7ed618a6b956 monnier committed Jun 29, 2007
Showing with 11 additions and 8 deletions.
  1. +3 −0 ChangeLog
  2. +8 −8 inf-haskell.el
View
@@ -1,5 +1,8 @@
2007-06-29 Stefan Monnier <monnier@iro.umontreal.ca>
+ * inf-haskell.el (inferior-haskell-compute-module-alist): Fix regexps.
+ (inferior-haskell-module-alist-file): Thinko.
+
* inf-haskell.el (inferior-haskell-run-command): New var.
(inferior-haskell-load-and-run): New command.
View
@@ -460,30 +460,30 @@ buffer."
(let ((package-w/o-version
(replace-regexp-in-string "[-.0-9]*\\'" "" package))
- (case-fold-search nil) ; Uppercase letters delimit modules.
;; Find the Haddock documentation URL for this package
(haddock
(progn
(goto-char (point-min))
- (when (re-search-forward "haddock-html:[ \t]+\\(.*[^ \t]\\)"
+ (when (re-search-forward "haddock-html:[ \t]+\\(.*[^ \t\n]\\)"
nil t)
(match-string 1)))))
;; Fetch the list of exposed modules for this package
(goto-char (point-min))
- (when (re-search-forward "^exposed-modules:[ \t]+" nil t)
- (while (looking-at "\\([[:upper:]]\\(\\sw\\|\\.\\)+\\)[ \n\t]*")
- (push (list (match-string 1) package-w/o-version haddock)
- module-alist)
- (goto-char (match-end 0))))))
+ (when (re-search-forward "^exposed-modules:\\(.*\\(\n[ \t].*\\)*\\)"
+ nil t)
+ (dolist (module (split-string (match-string 1)))
+ (push (list module package-w/o-version haddock)
+ module-alist)))))
(message "Generating module alist... done")
module-alist)))
(defcustom inferior-haskell-module-alist-file
;; (expand-file-name "~/.inf-haskell-module-alist")
- (expand-file-name (concat "inf-haskell-module-alist-" (user-uid))
+ (expand-file-name (concat "inf-haskell-module-alist-"
+ (number-to-string (user-uid)))
temporary-file-directory)
"Where to save the module -> package lookup table.
Set this to `nil' to never cache to a file."

0 comments on commit bf80267

Please sign in to comment.