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> ;; 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