Skip to content

Commit

Permalink
Merge pull request #900 from Khady/ocaml-reason-disable-pairs
Browse files Browse the repository at this point in the history
disable ' and ` for ocaml and reasonml
  • Loading branch information
Fuco1 authored Jul 17, 2018
2 parents 6329f77 + 08fbd38 commit 34b5332
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions smartparens-ml.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

;; Author: Ta Quang Trung <[email protected]>
;; Matus Goljer <[email protected]>
;; Louis Roché <[email protected]>
;; Maintainer: Matus Goljer <[email protected]>
;; Created: 14 July 2016
;; Keywords: smartparens, ML, ocaml, reason
Expand Down Expand Up @@ -50,8 +51,23 @@
(require 'smartparens)

;;; Local pairs for ML-family languages
(sp-with-modes '(tuareg-mode fsharp-mode) (sp-local-pair "(*" "*)" ))
(sp-with-modes '(reason-mode) (sp-local-pair "/*" "*/" ))

(sp-with-modes '(fsharp-mode)
(sp-local-pair "(*" "*)" ))

(sp-with-modes '(tuareg-mode)
;; Disable ` because it is used in polymorphic variants
(sp-local-pair "`" nil :actions nil)
;; Disable ' because it is used in value names and types
(sp-local-pair "'" nil :actions nil)
(sp-local-pair "(*" "*)" ))

(sp-with-modes '(reason-mode)
;; Disable ` because it is used in polymorphic variants
(sp-local-pair "`" nil :actions nil)
;; Disable ' because it is used in value names and types
(sp-local-pair "'" nil :actions nil)
(sp-local-pair "/*" "*/" ))

(provide 'smartparens-ml)
;;; smartparens-ml.el ends here

0 comments on commit 34b5332

Please sign in to comment.