From 14014e1a5e21c878ae03001890b9256a7c40148b Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 3 Aug 2010 12:26:25 +0900 Subject: [PATCH] completion for module vs funcs. --- elisp/ghc-comp.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-comp.el b/elisp/ghc-comp.el index 1babca3..2e2471b 100644 --- a/elisp/ghc-comp.el +++ b/elisp/ghc-comp.el @@ -157,9 +157,14 @@ unloaded modules are loaded") (defun ghc-module-completion-p () (or (minibufferp) + (let ((end (point))) + (save-excursion + (beginning-of-line) + (and (looking-at "import ") + (not (search-forward "(" end t))))) (save-excursion (beginning-of-line) - (looking-at "import ")))) + (looking-at " +module ")))) (defun ghc-select-completion-symbol () (cond