[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode 884795f 052/217: more fixes to strings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode 884795f 052/217: more fixes to strings |
Date: |
Sun, 29 Aug 2021 11:30:42 -0400 (EDT) |
branch: elpa/scala-mode
commit 884795f65a679ebb816641229581b8228746f5af
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
more fixes to strings
---
scala-mode-syntax.el | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/scala-mode-syntax.el b/scala-mode-syntax.el
index 8e9c514..6ef3099 100644
--- a/scala-mode-syntax.el
+++ b/scala-mode-syntax.el
@@ -107,7 +107,7 @@
(defconst scala-syntax:relaxed-char-and-string-literal-re
(concat scala-syntax:characterLiteral-re
"\\|" scala-syntax:multiLineStringLiteral-re
- "\\|\\(\"\\)" "\\(\\(\\\\\"\\|[^\"\n]\\)*[^\\\\\n\"]\\)?"
"\\(\"\\)"))
+ "\\|\\(\"\\)" "\\(\\\\.\\|[^\"\n\\]\\)*" "\\(\"\\)"))
;; Identifiers (Chapter 1.1)
(defconst scala-syntax:op-re
@@ -485,19 +485,19 @@ characters and one-line strings will not be fontified."
((match-beginning 4) ;; balanced multi-line literal
(scala-syntax:put-syntax-table-property 4 '(15 . nil))
(scala-syntax:put-syntax-table-property 7 '(15 . nil)))
- ((and (save-excursion ;; valid string-literals
- (goto-char (match-beginning 8))
- ;; really valid?
- (looking-at-p scala-syntax:oneLineStringLiteral-re))
- (or
- ;; normal string, content is not empty
- (match-end 10)
- ;; empty string at line end
- (= (match-end 11) (line-end-position))
- ;; no " after empty string
- (not (= (char-after (match-end 11)) ?\"))))
- (scala-syntax:put-syntax-table-property 8 '(7 . nil))
- (scala-syntax:put-syntax-table-property 11 '(7 . nil)))
+ ((or
+ ;; normal string, content is not empty
+ (match-beginning 9)
+ ;; empty string at line end
+ (= (match-end 10) (line-end-position))
+ ;; no " after empty string
+ (not (= (char-after (match-end 10)) ?\")))
+ (when (save-excursion
+ (goto-char (match-beginning 8))
+ ;; really valid?
+ (looking-at-p scala-syntax:oneLineStringLiteral-re))
+ (scala-syntax:put-syntax-table-property 8 '(7 . nil))
+ (scala-syntax:put-syntax-table-property 10 '(7 . nil))))
(t ;; backtrack and continue to next while loop
(goto-char (match-beginning 0))
(throw 'break nil)))))
- [nongnu] elpa/scala-mode 6f49104 193/217: scala-syntax:propertize-dollar, (continued)
- [nongnu] elpa/scala-mode 6f49104 193/217: scala-syntax:propertize-dollar, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2a7b0fd 195/217: Moved ensime/emacs-scala-mode back to hvesalai/emacs-scala-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5d28cb3 210/217: feat: support trailing commas (>= Scala 2.12.2), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b21befd 211/217: Fix README.md indenting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d837c96 203/217: doc: supports both Scala 2 and 3 (to some extent), not just 2.9, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2bf5621 207/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 402d6df 209/217: Merge pull request #165 from fommil/sbtn, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ac8106f 025/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d81bc28 028/217: indenting code lines also removes trailing whitespace, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 26cd0b7 040/217: merged from align-parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 884795f 052/217: more fixes to strings,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 7113976 059/217: Indenting for multi-line strings with margin, fixed row comment indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 8d4f34f 058/217: Use font-lock-doc-face for scaladoc comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 689bd7d 089/217: (require 'package), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode cb3f278 086/217: Update for marmalade / melpa package., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1a241eb 076/217: Add `scala-indent:insert-asterisk-on-multiline-comment`., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5cd1b20 068/217: Properly align constructor val and var params., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ad73d10 096/217: Merge pull request #49 from zbskii/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode defa2af 098/217: pkg.el cleanup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 13b30a6 093/217: Added Hugh Giddens to contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 9ab0a59 091/217: Update README.md, ELPA Syncer, 2021/08/29