From 61ebb031f4b48e64ce3a989e2b61f367cc6d2fbe Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 23 Apr 2010 18:51:07 +0900 Subject: [PATCH] bug fix for ESC-m. --- elisp/ghc-comp.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/elisp/ghc-comp.el b/elisp/ghc-comp.el index dc3ff69..78dc5b0 100644 --- a/elisp/ghc-comp.el +++ b/elisp/ghc-comp.el @@ -171,7 +171,12 @@ (defun ghc-load-module-buffer () (interactive) (when (eq major-mode 'haskell-mode) - (mapc 'ghc-load-module (ghc-gather-import-modules-buffer)))) + (ghc-load-module-this-buffer))) + +(defun ghc-load-module-this-buffer () + (dolist (mod (ghc-gather-import-modules)) + (ghc-load-module mod)) + (ghc-merge-keywords)) (defun ghc-load-module (mod) (when (and (member mod ghc-module-names) @@ -192,10 +197,7 @@ ;;; Background Idle Timer ;;; -(defun ghc-idle-timer () - (dolist (mod (ghc-gather-import-modules)) - (ghc-load-module mod)) - (ghc-merge-keywords)) +(defalias 'ghc-idle-timer 'ghc-load-module-this-buffer) (defun ghc-gather-import-modules () (let ((bufs (mapcar 'buffer-name (buffer-list)))