Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
(haskell-mode-map): Add bindings for the inferior-haskell commands.
Ignore-this: b044c1ba880bef18de57e3a1ff096da5
(haskell-mode-map): Add bindings for the inferior-haskell commands.
(turn-on-haskell-hugs, turn-on-haskell-ghci): Mark them as obsolete.

darcs-hash:20041125010507-c2f2e-59a1f1e39a09b3f9d51c1f4a929ab5790b062903.gz
  • Loading branch information
monnier committed Nov 25, 2004
1 parent 590b094 commit 30464be
Showing 1 changed file with 32 additions and 19 deletions.
51 changes: 32 additions & 19 deletions haskell-mode.el
Expand Up @@ -52,11 +52,11 @@
;; `haskell-simple-indent', Graeme E Moss and Heribert Schuetz
;; Simple indentation.
;;
;; `haskell-hugs', Guy Lapalme
;; Interaction with Hugs interpreter.
;;
;; `haskell-ghci', Chris Web
;; Interaction with GHCi interpreter.
;; `inf-haskell'
;; Interaction with an inferior Haskell process.
;; It replaces the previous two modules:
;; `haskell-hugs', Guy Lapalme
;; `haskell-ghci', Chris Web
;;
;;
;; This mode supports full Haskell 1.4 including literate scripts.
Expand Down Expand Up @@ -90,7 +90,6 @@
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)
;;
;; Make sure the module files are also on the load-path. Note that
;; the two indentation modules are mutually exclusive: Use only one.
Expand Down Expand Up @@ -221,10 +220,6 @@
"Turn on Haskell indentation." t)
(autoload 'turn-on-haskell-simple-indent "haskell-simple-indent"
"Turn on simple Haskell indentation." t)
(autoload 'turn-on-haskell-hugs "haskell-hugs"
"Turn on interaction with a Hugs interpreter." t)
(autoload 'turn-on-haskell-ghci "haskell-ghci"
"Turn on interaction with a GHCi interpreter." t)

;; Functionality provided in other files.
(autoload 'haskell-ds-create-imenu-index "haskell-decl-scan")
Expand All @@ -236,6 +231,17 @@
(interactive)
(turn-on-font-lock)
(message "turn-on-haskell-font-lock is obsolete. Use turn-on-font-lock instead."))
(defun turn-on-haskell-hugs ()
(interactive)
(message "haskell-hugs is obsolete.")
(load "haskell-hugs")
(turn-on-haskell-hugs))
(defun turn-on-haskell-ghci ()
(interactive)
(message "haskell-ghci is obsolete.")
(load "haskell-ghci")
(turn-on-haskell-ghci))


;; Are we looking at a literate script?
(defvar haskell-literate nil
Expand All @@ -261,9 +267,22 @@ be set to the preferred literate style. For example, place within
:group 'haskell)

;; Mode maps.
(defvar haskell-mode-map (let ((keymap (make-sparse-keymap)))
(define-key keymap "\C-c\C-c" 'comment-region)
keymap)
(defvar haskell-mode-map
(let ((keymap (make-sparse-keymap)))
;; Bindings for the inferior haskell process:
;; (define-key map [?\M-C-x] 'inferior-haskell-send-defun)
;; (define-key map [?\C-x ?\C-e] 'inferior-haskell-send-last-sexp)
;; (define-key map [?\C-c ?\C-r] 'inferior-haskell-send-region)
(define-key map [?\C-c ?\C-z] 'switch-to-haskell)
(define-key map [?\C-c ?\C-l] 'inferior-haskell-load-file)
;; Non standard in other inferior-modes, but traditional in haskell.
(define-key map [?\C-c ?\C-r] 'inferior-haskell-reload-file)
(define-key map [?\C-c ?\C-b] 'switch-to-haskell)
;; (define-key map [?\C-c ?\C-s] 'inferior-haskell-start-process)

;; That's what M-; is for.
;; (define-key keymap "\C-c\C-c" 'comment-region)
keymap)
"Keymap used in Haskell mode.")

;; Syntax table.
Expand Down Expand Up @@ -394,9 +413,6 @@ details.
Modules can hook in via `haskell-mode-hook'. The following modules
are supported with an `autoload' command:
`haskell-font-lock', Graeme E Moss and Tommy Thorn
Fontifies standard Haskell keywords, symbols, functions, etc.
`haskell-decl-scan', Graeme E Moss
Scans top-level declarations, and places them in a menu.
Expand All @@ -409,9 +425,6 @@ are supported with an `autoload' command:
`haskell-simple-indent', Graeme E Moss and Heribert Schuetz
Simple indentation.
`haskell-hugs', Guy Lapalme
Interaction with Hugs interpreter.
Module X is activated using the command `turn-on-X'. For example,
`haskell-font-lock' is activated using `turn-on-haskell-font-lock'.
For more information on a module, see the help for its `turn-on-X'
Expand Down

0 comments on commit 30464be

Please sign in to comment.