From 2740a265cb11c3d64faf20628027d1fb0e197ea0 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Sun, 27 Jun 2010 21:35:49 +0900 Subject: [PATCH] fixing a completion problem of Mod.Mod vs X.func. --- elisp/ghc-comp.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/elisp/ghc-comp.el b/elisp/ghc-comp.el index 53a323c..b089705 100644 --- a/elisp/ghc-comp.el +++ b/elisp/ghc-comp.el @@ -176,12 +176,14 @@ unloaded modules are loaded") (defun ghc-completion-start-point () (save-excursion - (let ((beg (save-excursion (beginning-of-line) (point)))) - (if (re-search-backward "[ (,`]" beg t) ;; xxx "." + (let ((beg (save-excursion (beginning-of-line) (point))) + (regex (save-excursion + (beginning-of-line) + (if (looking-at "import") "[ (,`]" "[ (,`.]")))) + (if (re-search-backward regex beg t) (1+ (point)) beg)))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Loading keywords