[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 43e7120 095/459: Merge remote-tracking bran
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 43e7120 095/459: Merge remote-tracking branch 'less-colors' |
Date: |
Sun, 22 Aug 2021 13:59:04 -0400 (EDT) |
branch: externals/csharp-mode
commit 43e71206e7eb69f827eb7c75214333e19d805f53
Merge: a854be8 c097a34
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Merge remote-tracking branch 'less-colors'
---
csharp-mode.el | 173 ++-------------------------------------------------------
1 file changed, 5 insertions(+), 168 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index 1caa308..dc3101d 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -788,85 +788,6 @@ a square parentasis block [ ... ]."
;; Fontify all keywords except the primitive types.
,`(,(concat "\\<" (c-lang-const c-regular-keywords-regexp))
1 font-lock-keyword-face)
-
-
- ;; Fontify leading identifiers as a reference? in fully
- ;; qualified names like "Foo.Bar".
- ,@(when (c-lang-const c-opt-identifier-concat-key)
- `((,(byte-compile
- `(lambda (limit)
- (csharp-log 3 "bmb reference? p(%d) L(%d)" (point)
limit)
- (while (re-search-forward
- ,(concat "\\(\\<" ;; 1
- "\\(" ;; 2
- ;;"[A-Z]";; uppercase - assume upper =
classname
- "[A-Za-z_]" ;; any old
- "[A-Za-z0-9_]*" ;; old: (c-lang-const
c-symbol-key)
- "\\)"
- "[ \t\n\r\f\v]*"
- "\\." ;;(c-lang-const
c-opt-identifier-concat-key)
- "[ \t\n\r\f\v]*"
- "\\)" ;; 1 ends
- "\\("
- "[[:alpha:]_][A-Za-z0-9_]*" ;; start
of another symbolname
- "\\)" ;; 3 ends
- )
- limit t)
- (csharp-log 3 "bmb ref? B(%d)" (match-beginning 0))
- (unless (progn
- (goto-char (match-beginning 0))
- (c-skip-comments-and-strings limit))
- (let* ((prefix (match-string 2))
- (me1 (match-end 1))
- (first-char (string-to-char prefix))
- (is-upper (and (>= first-char 65)
- (<= first-char 90))))
- (csharp-log 3 " - class/intf ref (%s)" prefix)
- ;; only put face if not there already
- (or (get-text-property (match-beginning 2) 'face)
- (c-put-font-lock-face (match-beginning 2)
- (match-end 2)
- (if is-upper
- font-lock-type-face
;; it's a type!
-
font-lock-variable-name-face)))
-
- (goto-char (match-end 3))
- (c-forward-syntactic-ws limit)
-
- ;; now, maybe fontify the thing afterwards, too
- (let ((c (char-after)))
- (csharp-log 3 " - now lkg at c(%c)" c)
-
- (cond
-
- ((= c 40) ;; open paren
- (or (get-text-property (match-beginning 3)
'face)
- (c-put-font-lock-face (match-beginning 3)
- (match-end 3)
-
font-lock-function-name-face))
- (goto-char (match-end 3)))
-
- ;; these all look like variables or properties
- ((or (= c 59) ;; semicolon
- (= c 91) ;; open sq brack
- (= c 41) ;; close paren
- (= c 44) ;; ,
- (= c 33) ;; !
- (= c 124) ;; |
- (= c 61) ;; =
- (= c 43) ;; +
- (= c 45) ;; -
- (= c 42) ;; *
- (= c 47)) ;; /
- (or (get-text-property (match-beginning 3)
'face)
- (c-put-font-lock-face (match-beginning 3)
- (match-end 3)
-
font-lock-variable-name-face))
- (goto-char (match-end 3)))
-
- (t
- (goto-char (match-end 1)))))))))))))
-
))
@@ -1064,88 +985,6 @@ a square parentasis block [ ... ]."
nil))
)))
-
- ;; Case 3: declaration of constructor
- ;;
- ;; Example:
- ;;
- ;; private Foo(...) {...}
- ;;
- ,@(when t
- `((,(byte-compile
- `(lambda (limit)
- (let ((parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties)))
- (found-it nil))
- (while (re-search-forward
- ,(concat
- "^[ \t\n\r\f\v]*"
-
"\\(\\<\\(public\\|private\\|protected\\)\\)?[ \t\n\r\f\v]+"
- "\\(@?[[:alpha:]_][[:alnum:]_]*\\)" ;; name
of constructor
- "[ \t\n\r\f\v]*"
- "\\("
- "("
- "\\)")
- limit t)
-
- (unless
- (progn
- (goto-char (match-beginning 0))
- (c-skip-comments-and-strings limit))
-
- (goto-char (match-end 0))
-
- (csharp-log 3 "ctor decl? L(%d) B(%d) E(%d)"
- limit (match-beginning 0) (point))
-
- (backward-char 1) ;; just left of the open paren
- (save-match-data
- ;; Jump over the parens, safely.
- ;; If it's an unbalanced paren, no problem,
- ;; do nothing.
- (if (c-safe (c-forward-sexp 1) t)
- (progn
- (c-forward-syntactic-ws)
- (cond
-
- ;; invokes base or this constructor.
- ((re-search-forward
- ,(concat
- "\\(:[
\t\n\r\f\v]*\\(base\\|this\\)\\)"
- "[ \t\n\r\f\v]*"
- "("
- )
- limit t)
- (csharp-log 3 " - ctor with
dependency?")
-
- (goto-char (match-end 0))
- (backward-char 1) ;; just left of the
open paren
- (csharp-log 3 " - before paren at %d"
(point))
-
- (if (c-safe (c-forward-sexp 1) t)
- (progn
- (c-forward-syntactic-ws)
- (csharp-log 3 " - skipped over
paren pair %d" (point))
- (if (eq (char-after) ?{)
- (setq found-it t)))))
-
- ;; open curly. no depedency on other
ctor.
- ((eq (char-after) ?{)
- (csharp-log 3 " - no dependency, curly
at %d" (point))
- (setq found-it t)))
-
- )))
-
- (if found-it
- ;; fontify the constructor symbol
- (c-put-font-lock-face (match-beginning 3)
- (match-end 3)
-
'font-lock-function-name-face))
- (goto-char (match-end 0)))))
- nil)))))
-
-
;; Case 4: using clause. Without this, using (..) gets fontified as
a fn.
,@(when t
`((,(byte-compile
@@ -1425,7 +1264,7 @@ a square parentasis block [ ... ]."
(c-lang-defconst c-modifier-kwds
csharp '("public" "partial" "private" "const" "abstract" "sealed"
"protected" "ref" "out" "static" "virtual"
- "override" "params" "internal"))
+ "override" "params" "internal" "async"))
;; Thu, 22 Apr 2010 23:02
@@ -1443,11 +1282,9 @@ a square parentasis block [ ... ]."
csharp '("struct" "class" "interface" "is" "as"
"delegate" "event" "set" "get" "add" "remove"))
-
-;; This allows the classes after the : in the class declartion to be
-;; fontified.
+;; Handle typeless variable declaration
(c-lang-defconst c-typeless-decl-kwds
- csharp '(":"))
+ csharp '("var"))
;; Sets up the enum to handle the list properly, and also the new
;; keyword to handle object initializers. This requires a modified
@@ -1460,7 +1297,7 @@ a square parentasis block [ ... ]."
;; Statement keywords followed directly by a substatement.
;; catch is not one of them, because catch has a paren (typically).
(c-lang-defconst c-block-stmt-1-kwds
- csharp '("do" "try" "finally" "unsafe"))
+ csharp '("do" "else" "try" "finally" "unsafe"))
;; Statement keywords followed by a paren sexp and then by a substatement.
@@ -1494,7 +1331,7 @@ a square parentasis block [ ... ]."
(c-lang-defconst c-other-kwds
csharp '("sizeof" "typeof" "is" "as" "yield" "extern"
"where" "select" "in" "from" "let" "orderby" "ascending"
"descending"
- "await" "async" "var"))
+ "await" "async"))
(c-lang-defconst c-overloadable-operators
;; EMCA-344, S14.2.1
- [elpa] externals/csharp-mode ebd67a1 209/459: Correctly indent nested generic object initializers, (continued)
- [elpa] externals/csharp-mode ebd67a1 209/459: Correctly indent nested generic object initializers, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5b89db2 088/459: Imenu: Correctly handle default-values in param-lists., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8ccafbc 092/459: remove unused rule and documentation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0e333c3 090/459: fontify else, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f96cf8b 089/459: remove fontification of accessors and constructors, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c097a34 093/459: add async as a function modifier, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode dd6c930 102/459: Merge pull request #43 from wasamasa/fix-major-mode-definition, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 55fe188 101/459: Use `define-derived-mode`, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c6a4ea 096/459: Add info about customization to readme., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f80eace 098/459: Revert "Fix runtime warnings about obsolete Emacs-functions.", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 43e7120 095/459: Merge remote-tracking branch 'less-colors',
ELPA Syncer <=
- [elpa] externals/csharp-mode e22eb34 210/459: imenu: support nested generic return-types., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1d2ef53 212/459: Fix imenu-indexing of members with underscore in name., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 33fb05c 213/459: imenu: Fix indexing of fields with _ in name., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 14bc3c6 215/459: Fix broken syntax-propertize., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2275dda 218/459: Properly document workaround for syntax-properties, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0183fc4 221/459: Prepare changelog for future bugs :), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0cd0b2c 226/459: Fix fontification of using-statements., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of namespaces to match using-statement rules., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c989a8 230/459: using: Don't mess up alnums in indentifier-fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5787aef 233/459: Update changelog., ELPA Syncer, 2021/08/22