2010-01-06 05:38:06 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;;
|
|
|
|
;;; ghc.el
|
|
|
|
;;;
|
|
|
|
|
|
|
|
;; Author: Kazu Yamamoto <Kazu@Mew.org>
|
|
|
|
;; Created: Sep 25, 2009
|
2010-02-19 14:43:03 +00:00
|
|
|
;; Revised:
|
2010-01-06 05:38:06 +00:00
|
|
|
|
|
|
|
;; Put the following code to your "~/.emacs".
|
|
|
|
;;
|
|
|
|
;; (autoload 'ghc-init "ghc" nil t)
|
|
|
|
;; (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(defvar ghc-version "0.1")
|
|
|
|
|
|
|
|
;; (require 'haskell-mode)
|
|
|
|
(require 'ghc-comp)
|
|
|
|
(require 'ghc-doc)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;;
|
|
|
|
;;; Customize Variables
|
|
|
|
;;;
|
|
|
|
|
|
|
|
(defvar ghc-completion-key "\e\t")
|
|
|
|
(defvar ghc-document-key "\e\C-d")
|
2010-01-06 05:39:30 +00:00
|
|
|
(defvar ghc-import-key "\e\C-e")
|
2010-01-06 05:38:06 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;;
|
|
|
|
;;; Initializer
|
|
|
|
;;;
|
|
|
|
|
|
|
|
(defvar ghc-initialized nil)
|
|
|
|
|
|
|
|
(defun ghc-init ()
|
|
|
|
(unless ghc-initialized
|
|
|
|
(define-key haskell-mode-map ghc-completion-key 'ghc-complete)
|
|
|
|
(define-key haskell-mode-map ghc-document-key 'ghc-browse-document)
|
2010-01-06 05:39:30 +00:00
|
|
|
(define-key haskell-mode-map ghc-import-key 'ghc-import-module)
|
2010-01-06 05:38:06 +00:00
|
|
|
(ghc-comp-init)
|
|
|
|
(setq ghc-initialized t)))
|