From c9dd697274419734f51e2c5edaae67841ded9e2a Mon Sep 17 00:00:00 2001 From: Heikki Vesalainen Date: Wed, 3 Apr 2013 17:34:36 +0300 Subject: [PATCH] alphaid-re for SIP11 support --- scala-mode2-fontlock.el | 1 + scala-mode2-syntax.el | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scala-mode2-fontlock.el b/scala-mode2-fontlock.el index 05f574b..c5e9603 100644 --- a/scala-mode2-fontlock.el +++ b/scala-mode2-fontlock.el @@ -487,6 +487,7 @@ Does not continue past limit. (save-excursion (goto-char (nth 8 state)) (looking-at "/\\*\\*\\($\\|[^*]\\)"))) + ;; scaladoc (starts with /** only) font-lock-doc-face (if (nth 3 state) font-lock-string-face font-lock-comment-face))) diff --git a/scala-mode2-syntax.el b/scala-mode2-syntax.el index c955ddc..1e90354 100644 --- a/scala-mode2-syntax.el +++ b/scala-mode2-syntax.el @@ -126,8 +126,9 @@ "\\(" "_+" scala-syntax:op-re "\\|" "_" "\\)?")) (defconst scala-syntax:varid-re (concat "[" scala-syntax:lower-group "]" scala-syntax:idrest-re)) (defconst scala-syntax:capitalid-re (concat "[" scala-syntax:upperAndUnderscore-group "]" scala-syntax:idrest-re)) -(defconst scala-syntax:plainid-re (concat "\\(" "[" scala-syntax:lower-group scala-syntax:upperAndUnderscore-group "]" scala-syntax:idrest-re - "\\|" scala-syntax:op-re "\\)")) +;; alphaid introduce by SIP11 +(defconst scala-syntax:alphaid-re (concat "\\(" "[" scala-syntax:lower-group scala-syntax:upperAndUnderscore-group "]" scala-syntax:idrest-re "\\)")) +(defconst scala-syntax:plainid-re (concat "\\(" scala-syntax:alphaid-re "\\|" scala-syntax:op-re "\\)")) ;; stringlit is referred to, but not defined Scala Language Specification 2.9 ;; we define it as consisting of anything but '`' and newline (defconst scala-syntax:stringlit-re "[^`\n\r]")