[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode c6ec8c2 306/459: Remove before/after functi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode c6ec8c2 306/459: Remove before/after functions |
Date: |
Sun, 22 Aug 2021 13:59:50 -0400 (EDT) |
branch: externals/csharp-mode
commit c6ec8c2e7882ea00deb4ef5f5110858e7c01065e
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>
Remove before/after functions
---
csharp-mode.el | 170 ++-------------------------------------------------------
1 file changed, 5 insertions(+), 165 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index 6a8b4d5..e2cbcd2 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -53,171 +53,11 @@
csharp (append '((?@ . "w"))
(c-lang-const c-identifier-syntax-modifications)))
-(c-lang-defconst c-basic-matchers-before
- "Font lock matchers for basic keywords, labels, references and various
-other easily recognizable things that should be fontified before generic
-casts and declarations are fontified. Used on level 2 and higher."
-
- ;; Note: `c-font-lock-declarations' assumes that no matcher here
- ;; sets `font-lock-type-face' in languages where
- ;; `c-recognize-<>-arglists' is set.
-
- chsarp `(;; Put a warning face on the opener of unclosed strings that
- ;; can't span lines and on the "terminating" newlines. Later font
- ;; lock packages have a `font-lock-syntactic-face-function' for
- ;; this, but it doesn't give the control we want since any
- ;; fontification done inside the function will be
- ;; unconditionally overridden.
- ("\\s|" 0 font-lock-warning-face t nil)
-
- ;; Invalid single quotes.
- c-font-lock-invalid-single-quotes
-
- ;; Fontify C++ raw strings.
- ,@(when (c-major-mode-is 'c++-mode)
- '(c-font-lock-raw-strings))
-
- ;; Fontify keyword constants.
- ,@(when (c-lang-const c-constant-kwds)
- (let ((re (c-make-keywords-re nil (c-lang-const
c-constant-kwds))))
- `((eval . (list ,(concat "\\<\\(" re "\\)\\>")
- 1 c-constant-face-name)))))
-
- ;; Fontify all keywords except the primitive types.
- ,`(,(concat "\\<" (c-lang-const c-regular-keywords-regexp))
- 1 font-lock-keyword-face)
-
- ;; Fontify leading identifiers in fully qualified names like
- "foo::bar" in languages that supports such things.
- ,@(when (c-lang-const c-opt-identifier-concat-key)
- ;; Java needs special treatment since "." is used both to
- ;; qualify names and in normal indexing. Here we look for
- ;; capital characters at the beginning of an identifier to
- ;; recognize the class. "*" is also recognized to cover
- ;; wildcard import declarations. All preceding dot separated
- ;; identifiers are taken as package names and therefore
- ;; fontified as references.
- `(,(c-make-font-lock-search-function
- ;; Search for class identifiers preceded by ".". The
- ;; anchored matcher takes it from there.
- (concat (c-lang-const c-opt-identifier-concat-key)
- (c-lang-const c-simple-ws) "*"
- (concat "\\("
- "[" c-upper "]"
- "[" (c-lang-const c-symbol-chars) "]*"
- "\\|"
- "\\*"
- "\\)"))
- `((let (id-end)
- (goto-char (1+ (match-beginning 0)))
- (while (and (eq (char-before) ?.)
- (progn
- (backward-char)
- (c-backward-syntactic-ws)
- (setq id-end (point))
- (< (skip-chars-backward
- ,(c-lang-const c-symbol-chars))
- 0))
- (not (get-text-property (point) 'face)))
- (c-put-font-lock-face (point) id-end
- c-reference-face-name)
- (c-backward-syntactic-ws)))
- nil
- (goto-char (match-end 0)))))
-
- `((,(byte-compile
- ;; Must use a function here since we match longer than
- ;; we want to move before doing a new search. This is
- ;; not necessary for XEmacs since it restarts the
- ;; search from the end of the first highlighted
- ;; submatch (something that causes problems in other
- ;; places).
- `(lambda (limit)
- (while (re-search-forward
- ,(concat "\\(\\<" ; 1
- "\\(" (c-lang-const c-symbol-key) "\\)"
; 2
- (c-lang-const c-simple-ws) "*"
- (c-lang-const
c-opt-identifier-concat-key)
- (c-lang-const c-simple-ws) "*"
- "\\)"
- "\\("
- (c-lang-const c-opt-after-id-concat-key)
- "\\)")
- limit t)
- (unless (progn
- (goto-char (match-beginning 0))
- (c-skip-comments-and-strings limit))
- (or (get-text-property (match-beginning 2) 'face)
- (c-put-font-lock-face (match-beginning 2)
- (match-end 2)
- c-reference-face-name))
- (goto-char (match-end 1)))))))))
-
- (eval . (list "\\(!\\)[^=]" 1 c-negation-char-face-name))))
-
(c-lang-defconst c-basic-matchers-after
- "Font lock matchers for various things that should be fontified after
-generic casts and declarations are fontified. Used on level 2 and
-higher."
-
- csharp `(,@(when (c-lang-const c-brace-list-decl-kwds)
- ;; Fontify the remaining identifiers inside an enum list when
we start
- ;; inside it.
- '(c-font-lock-enum-tail
- ;; Fontify the identifiers inside enum lists. (The enum type
- ;; name is handled by `c-simple-decl-matchers' or
- ;; `c-complex-decl-matchers' below.
- c-font-lock-enum-body))
-
- ;; Fontify labels after goto etc.
- ,@(when (c-lang-const c-before-label-kwds)
- `(;; (Got three different interpretation levels here,
- ;; which makes it a bit complicated: 1) The backquote
- ;; stuff is expanded when compiled or loaded, 2) the
- ;; eval form is evaluated at font-lock setup (to
- ;; substitute c-label-face-name correctly), and 3) the
- ;; resulting structure is interpreted during
- ;; fontification.)
- (eval
- . ,(let* ((c-before-label-re
- (c-make-keywords-re nil
- (c-lang-const c-before-label-kwds))))
- `(list
- ,(concat "\\<\\(" c-before-label-re "\\)\\>"
- "\\s *"
- "\\(" ; identifier-offset
- (c-lang-const c-symbol-key)
- "\\)")
- (list ,(+ (regexp-opt-depth c-before-label-re) 2)
- c-label-face-name nil t))))))
-
- ;; Fontify the clauses after various keywords.
- ,@(when (or (c-lang-const c-type-list-kwds)
- (c-lang-const c-ref-list-kwds)
- (c-lang-const c-colon-type-list-kwds))
- `((,(c-make-font-lock-BO-decl-search-function
- (concat "\\<\\("
- (c-make-keywords-re nil
- (append (c-lang-const c-type-list-kwds)
- (c-lang-const c-ref-list-kwds)
- (c-lang-const c-colon-type-list-kwds)))
- "\\)\\>")
- '((c-fontify-types-and-refs ((c-promote-possible-types t))
- (c-forward-keyword-clause 1)
- (if (> (point) limit) (goto-char limit))))))))
-
- ,@(when (c-lang-const c-paren-type-kwds)
- `((,(c-make-font-lock-search-function
- (concat "\\<\\("
- (c-make-keywords-re nil
- (c-lang-const c-paren-type-kwds))
- "\\)\\>")
- '((c-fontify-types-and-refs ((c-promote-possible-types t))
- (c-forward-keyword-clause 1)
- (if (> (point) limit) (goto-char limit))))))))
-
- ,@(when (c-major-mode-is 'java-mode)
- '((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1
c-annotation-face))))))
+ csharp (append nil
+ ;; cc-mode defaults
+ (c-lang-const c-basic-matchers-after)))
+
(c-lang-defconst c-symbol-start
csharp (concat "[" c-alpha "_@]"))
@@ -345,7 +185,7 @@ higher."
"define"))
(c-lang-defconst c-cpp-message-directives
- csharp '("error" "warning"))
+ csharp '("error" "warning" "region"))
(c-lang-defconst c-cpp-expr-directives
csharp '("if" "elif"))
- [elpa] externals/csharp-mode 57bd21b 279/459: Merge pull request #152 from DamienCassou/typos, (continued)
- [elpa] externals/csharp-mode 57bd21b 279/459: Merge pull request #152 from DamienCassou/typos, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 31124db 281/459: Merge pull request #156 from krzsztf/fix-lambda-indentation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ff4111e 278/459: Fix typos, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9c596c9 283/459: Advice to override only in csharp-mode, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 617dd6d 284/459: Ensure ad-do-it is called on else branch, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3d02042 291/459: makefile: Make repeated test-runs faster to run., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 072c3dc 292/459: Fix parts of `fontification-of-literals-detects-end-of-strings`, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2ab4d62 293/459: Remove unused import, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e79d694 299/459: Add standard query operators kwds, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 608805c 300/459: Relicense to GPLv3, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c6ec8c2 306/459: Remove before/after functions,
ELPA Syncer <=
- [elpa] externals/csharp-mode 70d3d89 297/459: Fix cl failure for old cc-mode versions, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 919dd65 294/459: Fix c-default-style warnings, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b85033a 309/459: Make fontification a little less 'constant-heavy', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 795b9bb 301/459: Merge pull request #168 from josteink/relicense, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3fc339e 310/459: Add fontification to functions, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3526396 305/459: Remove before/after functions, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode dbbd17a 312/459: Merge pull request #171 from josteink/fontification-lighter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7a41dad 318/459: Add attributes to indentation-tests, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f46d656 321/459: Fix indentation in one defconst, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 49d8392 323/459: Add nullable operator to concatenated identifiers, ELPA Syncer, 2021/08/22