emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/smartparens 22794b5 2/2: Merge pull request #1099 from nig


From: ELPA Syncer
Subject: [nongnu] elpa/smartparens 22794b5 2/2: Merge pull request #1099 from nigredo-tori/scala-triple-quotes
Date: Tue, 17 Aug 2021 15:57:33 -0400 (EDT)

branch: elpa/smartparens
commit 22794b5b3773504610127c5f011629402dfec20c
Merge: 1d7f8fb 9ffb373
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #1099 from nigredo-tori/scala-triple-quotes
---
 smartparens-scala.el           | 2 ++
 test/smartparens-scala-test.el | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/smartparens-scala.el b/smartparens-scala.el
index 7e79016..7b37472 100644
--- a/smartparens-scala.el
+++ b/smartparens-scala.el
@@ -76,5 +76,7 @@
                                 ("| " "SPC")
                                 sp-scala-wrap-with-indented-newlines))
 
+(sp-local-pair 'scala-mode "\"\"\"" "\"\"\"")
+
 (provide 'smartparens-scala)
 ;;; smartparens-scala.el ends here
diff --git a/test/smartparens-scala-test.el b/test/smartparens-scala-test.el
index 596b0cb..5c669f5 100644
--- a/test/smartparens-scala-test.el
+++ b/test/smartparens-scala-test.el
@@ -43,3 +43,10 @@
       (scala-mode)
     (execute-kbd-macro "{")
     (should (equal (buffer-string) "{\n  foo\n}"))))
+
+(ert-deftest sp-test-scala-triple-quotes ()
+  "Close triple quotes"
+  (sp-test-with-temp-buffer "sql|"
+      (scala-mode)
+    (execute-kbd-macro (kbd "\"\"\"SELECT"))
+    (should (equal (buffer-string) "sql\"\"\"SELECT\"\"\""))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]