[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>
|
;; Author: Tom Willemse <chelys@rincewind>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2021.0715.221855
|
;; Version: 2022.0927.133444
|
||||||
;; Package-Requires: (embrace)
|
;; Package-Requires: (embrace)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -31,12 +31,15 @@
|
||||||
|
|
||||||
(require 'embrace)
|
(require 'embrace)
|
||||||
|
|
||||||
(defun oni-embrace-add-slashes ()
|
(defun oni-embrace-add-extra-pairs ()
|
||||||
"Add slashes to the embrace pairs.
|
"Add extra pairs to the embrace pairs.
|
||||||
‘groovy-mode’ for example supports strings delimited by slashes."
|
‘groovy-mode’ for example supports strings delimited by slashes
|
||||||
(embrace-add-pair ?/ "/" "/"))
|
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)
|
(provide 'oni-embrace)
|
||||||
;;; oni-embrace.el ends here
|
;;; oni-embrace.el ends here
|
||||||
|
|
Loading…
Reference in a new issue