-
Notifications
You must be signed in to change notification settings - Fork 69
/
scala-mode-map.el
28 lines (23 loc) · 1.03 KB
/
scala-mode-map.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
;;; scala-mode-map.el - Major mode for editing scala, keyboard map -*- lexical-binding: t -*-
;;; Copyright (c) 2012 Heikki Vesalainen
;;; For information on the License, see the LICENSE file
(require 'scala-mode-indent)
(defvar scala-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map prog-mode-map)
;(substitute-key-definition 'delete-indentation 'scala-indent:join-line map global-map)
map)
"Local key map used for scala mode")
(defun scala-mode-map:add-self-insert-hooks ()
(add-hook 'post-self-insert-hook
'scala-indent:indent-on-parentheses nil t)
(add-hook 'post-self-insert-hook
'scala-indent:indent-on-special-words nil t)
(add-hook 'post-self-insert-hook
'scala-indent:indent-on-scaladoc-asterisk nil t)
(add-hook 'post-self-insert-hook
'scala-indent:fix-scaladoc-close nil t))
(defun scala-mode-map:add-remove-indent-hook ()
(add-hook 'post-command-hook
'scala-indent:remove-indent-from-previous-empty-line))
(provide 'scala-mode-map)