1
0
Fork 0

[oni-embrace] Add """ and ''' as pairs for Groovy

This commit is contained in:
Tom Willemse 2022-09-27 23:44:48 -07:00
parent 9c7baa6235
commit 81b630718c

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <chelys@rincewind>
;; Keywords: local
;; Version: 2021.0715.221855
;; Version: 2022.0927.133444
;; Package-Requires: (embrace)
;; This program is free software; you can redistribute it and/or modify
@ -31,12 +31,15 @@
(require 'embrace)
(defun oni-embrace-add-slashes ()
"Add slashes to the embrace pairs.
groovy-mode for example supports strings delimited by slashes."
(embrace-add-pair ?/ "/" "/"))
(defun oni-embrace-add-extra-pairs ()
"Add extra pairs to the embrace pairs.
groovy-mode for example supports strings delimited by slashes
and triple-quoted strings."
(embrace-add-pair ?/ "/" "/")
(embrace-add-pair ?m "\"\"\"" "\"\"\"")
(embrace-add-pair ?n "'''" "'''"))
(add-hook 'groovy-mode-hook #'oni-embrace-add-slashes)
(add-hook 'groovy-mode-hook #'oni-embrace-add-extra-pairs)
(provide 'oni-embrace)
;;; oni-embrace.el ends here