branch: elpa/haskell-tng-mode commit 6ade588f5fb6d3aca853c1c191eba2336289f6cb Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
key bindings in compilation mode --- haskell-tng-compile.el | 6 +++++- haskell-tng-font-lock.el | 1 + haskell-tng-mode.el | 5 +---- haskell-tng-smie.el | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/haskell-tng-compile.el b/haskell-tng-compile.el index a7fb555..a644704 100644 --- a/haskell-tng-compile.el +++ b/haskell-tng-compile.el @@ -116,7 +116,11 @@ will cause the subsequent call to prompt." (define-compilation-mode haskell-tng-compilation-mode "haskell-tng-compilation" (add-hook 'compilation-filter-hook - 'haskell-tng--compile-ansi-color nil t)) + 'haskell-tng--compile-ansi-color nil t) + (cl-flet ((bind (key def) + (define-key haskell-tng-compilation-mode-map (kbd key) def))) + (bind "C-c c" 'haskell-tng-compile) + (bind "C-c e" 'next-error))) (provide 'haskell-tng-compile) ;;; haskell-tng-compile.el ends here diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el index cbe8343..17c3d6b 100644 --- a/haskell-tng-font-lock.el +++ b/haskell-tng-font-lock.el @@ -284,6 +284,7 @@ succeeds and may further restrict the FIND search limit." haskell-tng--util-paren-close haskell-tng--util-indent-close-previous haskell-tng--util-do-bind) +;; TODO commas end a type signature in a record of functions (haskell-tng--font-lock-multiline topdecl (rx line-start (| "data" "newtype" "class" "instance") word-end) diff --git a/haskell-tng-mode.el b/haskell-tng-mode.el index fe6c027..954350b 100644 --- a/haskell-tng-mode.el +++ b/haskell-tng-mode.el @@ -86,15 +86,12 @@ Load `prettify-symbols-mode' in `haskell-tng-mode-hook'." (haskell-tng--smie-setup) - (cl-flet ((bind (key def) (define-key haskell-tng-mode-map (kbd key) def)) - (bind-compile (key def) (define-key haskell-tng-mode-map (kbd key) def))) + (cl-flet ((bind (key def) (define-key haskell-tng-mode-map (kbd key) def))) (bind "<return>" 'haskell-tng-newline) ;; core compilation loop, supports C-u and C-- prefixes (bind "C-c c" 'haskell-tng-compile) (bind "C-c e" 'next-error) - (bind-compile "C-c c" 'haskell-tng-compile) - (bind-compile "C-c e" 'next-error) ;; external tools (bind "C-c C" 'haskell-tng-stack2cabal) diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el index b3429f8..dfd5d6a 100644 --- a/haskell-tng-smie.el +++ b/haskell-tng-smie.el @@ -46,6 +46,7 @@ (call-interactively #'comment-indent-new-line) (when rem (save-excursion + ;; TODO prune trailing whitespace (insert rem))))) ;; TODO autodetection of indent options