implementing ghc-jump-file.

This commit is contained in:
Kazu Yamamoto 2014-03-31 14:58:41 +09:00
parent 63acecf0b5
commit 1e4dce2944
2 changed files with 10 additions and 0 deletions

View File

@ -266,6 +266,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-jump-file ()
(interactive)
(let* ((ovl (car (ghc-check-overlay-at 1)))
(file (if ovl (overlay-get ovl 'ghc-file))))
(if file (find-file file))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar ghc-hlint-options nil "*Hlint options")
(defvar ghc-check-command nil)

View File

@ -48,6 +48,7 @@
(defvar ghc-info-key "\C-c\C-i")
(defvar ghc-check-key "\C-x\C-s")
(defvar ghc-toggle-key "\C-c\C-c")
(defvar ghc-jump-key "\C-c\C-j")
(defvar ghc-module-key "\C-c\C-m")
(defvar ghc-expand-key "\C-c\C-e")
(defvar ghc-kill-key "\C-c\C-k")
@ -80,6 +81,7 @@
(define-key haskell-mode-map ghc-sort-key 'ghc-sort-lines)
(define-key haskell-mode-map ghc-check-key 'ghc-save-buffer)
(define-key haskell-mode-map ghc-toggle-key 'ghc-toggle-check-command)
(define-key haskell-mode-map ghc-jump-key 'ghc-jump-file)
(define-key haskell-mode-map ghc-module-key 'ghc-insert-module)
(define-key haskell-mode-map ghc-kill-key 'ghc-kill-process)
(define-key haskell-mode-map ghc-hoogle-key 'haskell-hoogle)