diff --git a/elisp/ghc-comp.el b/elisp/ghc-comp.el index 423cc64..71159b3 100644 --- a/elisp/ghc-comp.el +++ b/elisp/ghc-comp.el @@ -15,13 +15,20 @@ ;;; Customize Variables ;;; -(defvar ghc-idle-timer-interval 30) +(defvar ghc-idle-timer-interval 30 + "*Period of idele timer in second. When timeout, the names of +unloaded modules are loaded") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Constants +;;; ;; must be sorted -(defvar ghc-reserved-keyword-for-bol '("class" "data" "default" "import" "infix" "infixl" "infixr" "instance" "main" "module" "newtype" "type")) +(defconst ghc-reserved-keyword-for-bol '("class" "data" "default" "import" "infix" "infixl" "infixr" "instance" "main" "module" "newtype" "type")) ;; must be sorted -(defvar ghc-reserved-keyword '("case" "deriving" "do" "else" "if" "in" "let" "module" "of" "then" "where")) +(defconst ghc-reserved-keyword '("case" "deriving" "do" "else" "if" "in" "let" "module" "of" "then" "where")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; @@ -42,7 +49,7 @@ (defvar ghc-merged-keyword nil) ;; completion for type/func/... (defvar ghc-language-extensions nil) -(defvar ghc-keyword-prefix "ghc-keyword-") +(defconst ghc-keyword-prefix "ghc-keyword-") (defvar ghc-keyword-Prelude nil) (defvar ghc-loaded-module nil) diff --git a/elisp/ghc-doc.el b/elisp/ghc-doc.el index f50a6e9..69a1a75 100644 --- a/elisp/ghc-doc.el +++ b/elisp/ghc-doc.el @@ -34,8 +34,8 @@ (when (looking-at "^haddock-html: \\([^ \n]+\\)$") (match-string-no-properties 1)))) -(defvar ghc-doc-local-format "file://%s/%s.html") -(defvar ghc-doc-hackage-format +(defconst ghc-doc-local-format "file://%s/%s.html") +(defconst ghc-doc-hackage-format "http://hackage.haskell.org/packages/archive/%s/latest/doc/html/%s.html") (defun ghc-display-document (pkg mod haskell-org) diff --git a/elisp/ghc-flymake.el b/elisp/ghc-flymake.el index 96840f1..03e9959 100644 --- a/elisp/ghc-flymake.el +++ b/elisp/ghc-flymake.el @@ -16,12 +16,12 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar ghc-error-buffer-name "*GHC Errors*") +(defconst ghc-error-buffer-name "*GHC Errors*") -(defvar ghc-flymake-allowed-file-name-masks +(defconst ghc-flymake-allowed-file-name-masks '("\\.l?hs$" ghc-flymake-init flymake-simple-cleanup flymake-get-real-file-name)) -(defvar ghc-flymake-err-line-patterns +(defconst ghc-flymake-err-line-patterns '("^\\(.*\\.l?hs\\):\\([0-9]+\\):\\([0-9]+\\):[ ]*\\(.+\\)" 1 2 3 4)) (add-to-list 'flymake-allowed-file-name-masks diff --git a/elisp/ghc-func.el b/elisp/ghc-func.el index 09c58b9..07dd2cb 100644 --- a/elisp/ghc-func.el +++ b/elisp/ghc-func.el @@ -8,7 +8,8 @@ ;;; Code: -(defvar ghc-module-command "ghc-mod") +(defvar ghc-module-command "ghc-mod" +"*The command name of \"ghc-mod\"") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/elisp/ghc.el b/elisp/ghc.el index ccc7d81..833c0ed 100644 --- a/elisp/ghc.el +++ b/elisp/ghc.el @@ -16,7 +16,7 @@ ;;; Code: -(defvar ghc-version "0.4.0") +(defconst ghc-version "0.4.0") ;; (eval-when-compile ;; (require 'haskell-mode))