File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -230,11 +230,26 @@ We chose to load the .psci file's content (the purescript doc proposes its use).
230230 (locate-dominating-file default-directory)
231231 expand-file-name))
232232
233- ; ; Add some default bindings
234- (add-hook 'purescript-mode-hook (lambda ()
235- (define-key purescript-mode-map (kbd " C-c C-l" ) 'psci/load-current-file! )
236- (define-key purescript-mode-map (kbd " C-c C-r" ) 'psci/load-project-modules! )
237- (define-key purescript-mode-map (kbd " C-c M-n" ) 'psci/load-module! )))
233+ (defvar inferior-psci-mode-map
234+ (let ((map (make-sparse-keymap )))
235+ (define-key map (kbd " C-c C-l" ) 'psci/load-current-file! )
236+ (define-key map (kbd " C-c C-r" ) 'psci/load-project-modules! )
237+ (define-key map (kbd " C-c M-n" ) 'psci/load-module! )
238+ map)
239+ " Basic mode map for `inferior-psci-mode' ." )
240+
241+ (defgroup psci nil " psci customisation group."
242+ :tag " psci"
243+ :version " 0.0.4" )
244+
245+ ;;;### autoload
246+ (define-minor-mode inferior-psci-mode " Extend the bindings ."
247+ :lighter " ip"
248+ :keymap inferior-psci-mode-map
249+ :group 'psci )
250+
251+ ; ; Add some default bindings through hook customisation
252+ ; ; (add-hook 'purescript-mode-hook 'inferior-psci-mode)
238253
239254(provide 'psci )
240255; ;; psci.el ends here
Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ CLOSED: [2014-10-29 Wed 18:54]
2727- [X] Add to el-get - https://github.com/ardumont/el-get/blob/add-psci-recipe/recipes/psci.rcp
2828- [X] Update documentation regarding installation steps
2929- [X] Update documentation regarding usage
30- * IN-PROGRESS 0.0.4 [75 %]
30+ * IN-PROGRESS 0.0.4 [87 %]
3131- [X] Update version
3232- [X] Add an interactive command for displaying the current version
3333- [X] Use compatible with old emacs version api (replace `(setq-local var val)` with `(set (make-local-variable 'var) val)`)
3434- [X] `shell-quote-argument` around shell code
3535- [X] Remove projectile dependencies and compute the root folder using emacs primitives (thanks @purcell again)
3636- [X] Update el-get PR to remove projectile dependencies - https://github.com/dimitri/el-get/pull/1973
37- - [ ] Add a minor mode instead of modifying purescript-mode-map
37+ - [X ] Add a minor mode instead of modifying purescript-mode-map
3838- [ ] Update documentation about the minor-mode activation
You can’t perform that action at this time.
0 commit comments