[oni-embrace] Add """ and ''' as pairs for Groovy
This commit is contained in:
parent
9c7baa6235
commit
81b630718c
1 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue