[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode d6f8cee 135/217: scala 2.10 preamble
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode d6f8cee 135/217: scala 2.10 preamble |
Date: |
Sun, 29 Aug 2021 11:30:59 -0400 (EDT) |
branch: elpa/scala-mode
commit d6f8cee5751f601c884a585af728ddd42b48635e
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
scala 2.10 preamble
Fix #71
---
scala-mode2-syntax.el | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/scala-mode2-syntax.el b/scala-mode2-syntax.el
index 18aa4a6..1df4456 100644
--- a/scala-mode2-syntax.el
+++ b/scala-mode2-syntax.el
@@ -235,9 +235,6 @@
(defconst scala-syntax:preamble-start-re
"\#\!")
-(defconst scala-syntax:preamble-end-re
- "\!\\(\#\\)[ \t]*$")
-
(defconst scala-syntax:empty-line-re
"^\\s *$")
@@ -545,19 +542,15 @@ characters and one-line strings will not be fontified."
(t (throw 'break nil)))))))))
(defun scala-syntax:propertize-shell-preamble (start end)
- "Mark a shell preamble pair (#!/!#) at the beginning of a script as a
comment."
+ "Mark a shell preamble (#!) at the beginning of a script as a line comment."
(save-excursion
- (let ((comment-start (nth 8 (syntax-ppss))))
- (goto-char start)
- (when (and (= start 1)
- (looking-at scala-syntax:preamble-start-re))
- (scala-syntax:put-syntax-table-property 0 '(11 . nil))
- (setq comment-start 1))
- (when (and (eq comment-start 1)
- (goto-char comment-start)
- (looking-at scala-syntax:preamble-start-re)
- (re-search-forward scala-syntax:preamble-end-re end t))
- (scala-syntax:put-syntax-table-property 1 '(12 . nil))))))
+ (goto-char start)
+ (when (and (= start 1)
+ (looking-at scala-syntax:preamble-start-re))
+ (scala-syntax:put-syntax-table-property 0 '(11 . nil))
+ (end-of-line)
+ (when (re-search-forward "\n" end t)
+ (scala-syntax:put-syntax-table-property 0 '(12 . nil))))))
(defun scala-syntax:propertize-underscore-and-idrest (start end)
"Mark all underscores (_) as symbol constituents (syntax 3) or
- [nongnu] elpa/scala-mode ecbed5f 121/217: use the existing ELISP_COMMAND instead of EMACSBIN, (continued)
- [nongnu] elpa/scala-mode ecbed5f 121/217: use the existing ELISP_COMMAND instead of EMACSBIN, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c53742a 122/217: add Marmalade instructions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3df7da0 133/217: Merge pull request #66 from corruptmemory/improved-syntax, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 69e071e 140/217: scala-syntax:forward-modifiers: Unmatched [ or [^ error, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d8a141b 125/217: Makefile clean-up, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 34888c0 142/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f03a582 141/217: Merge pull request #83 from ancane/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 461f9a5 134/217: Fix issue #63 and names with _ and reserved word, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ababc73 151/217: remove interactive, update filename., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 27efa44 019/217: updated README, added LICENSE, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d6f8cee 135/217: scala 2.10 preamble,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 03cfbe4 148/217: Add types to index items., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ed645d2 153/217: move create index function for imenu to big setq with everything else., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 618f0fb 163/217: remove 'scala-indent:indent-on-parentheses in preference of smartparens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 56cba29 194/217: Fix bad syntax when `*/` is prefixed by an opcode. (#143), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a1ff6f3 202/217: feat: add Scala 3 keywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 46bb948 198/217: Fix #155, remove ob-scala.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a2a1b1d 208/217: compile mode with sbt thin client, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 54fa36f 200/217: Merge pull request #159 from kpbochenek/fix-files-association-alist, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5058a85 204/217: doc: clarify Scala versions supported, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0c5ed9e 022/217: deleted example files, ELPA Syncer, 2021/08/29