From 81b630718c27dfe02ee2b5f2bbc6922caa6b61d4 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 27 Sep 2022 23:44:48 -0700 Subject: [oni-embrace] Add """ and ''' as pairs for Groovy --- oni-embrace.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'oni-embrace.el') diff --git a/oni-embrace.el b/oni-embrace.el index c361ab4..099a650 100644 --- a/oni-embrace.el +++ b/oni-embrace.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; 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 -- cgit v1.2.3-54-g00ecf