branch: elpa/scala-mode commit 9d3b56e4877284a815b599a37d2b749d4f972226 Merge: 1d08e88 5299b4a Author: Heikki Vesalainen <heikkivesalai...@yahoo.com> Commit: GitHub <nore...@github.com>
Merge pull request #161 from Kazark/scala3-keywords feat: add Scala 3 keywords --- scala-mode-syntax.el | 17 ++++++++++++----- scala-mode.el | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scala-mode-syntax.el b/scala-mode-syntax.el index 1817868..995485b 100644 --- a/scala-mode-syntax.el +++ b/scala-mode-syntax.el @@ -283,11 +283,18 @@ (concat "\\(^\\|[^`'_]\\)\\(" scala-syntax:value-keywords-unsafe-re "\\)")) (defconst scala-syntax:other-keywords-unsafe-re - (regexp-opt '("abstract" "case" "catch" "class" "def" "do" "else" "extends" - "final" "finally" "for" "forSome" "if" "implicit" "import" - "lazy" "match" "new" "object" "override" "package" "private" - "protected" "return" "sealed" "throw" "trait" "try" "type" - "val" "var" "while" "with" "yield" "inline") 'words)) + (regexp-opt '("abstract" "case" "catch" "class" "def" "do" "else" "enum" + "export" "extends" "final" "finally" "for" "given" "forSome" + "if" "implicit" "import" "lazy" "match" "new" "object" + "override" "package" "private" "protected" "return" "sealed" + "then" "throw" "trait" "try" "type" "val" "var" "while" + "with" "yield" + ;; "Soft" keywords https://dotty.epfl.ch/docs/internals/syntax.html#soft-keywords + ;; Presumably this means they do not apply in all contexts. Do + ;; not know of a way to support this in Emacs, so preferring + ;; supporting them everywhere, as regular keywords. + "as" "derives" "end" "extension" "inline" "opaque" "open" + "transparent" "using") 'words)) (defconst scala-syntax:other-keywords-re (concat "\\(^\\|[^`'_]\\)\\(" scala-syntax:other-keywords-unsafe-re "\\)")) diff --git a/scala-mode.el b/scala-mode.el index fecf4fb..95b5203 100644 --- a/scala-mode.el +++ b/scala-mode.el @@ -30,7 +30,7 @@ emacs-major-version emacs-minor-version))) (defgroup scala nil - "A programming mode for the Scala language 2.9" + "A programming mode for the Scala language 2 and 3" :group 'languages) (defmacro scala-mode:make-local-variables (&rest quoted-names)