[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 55fe188 101/459: Use `define-derived-mode`
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 55fe188 101/459: Use `define-derived-mode` |
Date: |
Sun, 22 Aug 2021 13:59:05 -0400 (EDT) |
branch: externals/csharp-mode
commit 55fe188c41fef31aae81e77a446e4b651a134d02
Author: Vasilij Schneidermann <v.schneidermann@gmail.com>
Commit: Vasilij Schneidermann <v.schneidermann@gmail.com>
Use `define-derived-mode`
---
csharp-mode.el | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index d87a4f5..0a02034 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -4159,7 +4159,7 @@ The return value is meaningless, and is ignored by
cc-mode.
;;; The entry point into the mode
;;;###autoload
- (defun csharp-mode ()
+(define-derived-mode csharp-mode c-mode "C#"
"Major mode for editing C# code. This mode is derived from CC Mode to
support C#.
@@ -4206,12 +4206,9 @@ use imenu, you can turn this off with the variable
`csharp-want-imenu'.
Key bindings:
\\{csharp-mode-map}"
- (interactive)
- (kill-all-local-variables)
(make-local-variable 'beginning-of-defun-function)
(make-local-variable 'end-of-defun-function)
(c-initialize-cc-mode t)
- (set-syntax-table csharp-mode-syntax-table)
;; define underscore as part of a word in the Csharp syntax table
(modify-syntax-entry ?_ "w" csharp-mode-syntax-table)
@@ -4219,12 +4216,6 @@ Key bindings:
;; define @ as an expression prefix in Csharp syntax table
(modify-syntax-entry ?@ "'" csharp-mode-syntax-table)
- (setq major-mode 'csharp-mode
- mode-name "C#"
- local-abbrev-table csharp-mode-abbrev-table
- abbrev-mode t)
- (use-local-map csharp-mode-map)
-
;; `c-init-language-vars' is a macro that is expanded at compile
;; time to a large `setq' with all the language variables and their
;; customized values for our language.
@@ -4236,8 +4227,8 @@ Key bindings:
(unless (or c-file-style
(stringp c-default-style)
(assq 'csharp-mode c-default-style))
- (c-set-style "c#" t))
-
+ (c-set-style "C#"))
+
;; `c-common-init' initializes most of the components of a CC Mode
;; buffer, including setup of the mode menu, font-lock, etc.
;; There's also a lower level routine `c-basic-common-init' that
@@ -4245,7 +4236,7 @@ Key bindings:
;; analysis and similar things working.
(c-common-init 'csharp-mode)
- (local-set-key (kbd "/") 'csharp-maybe-insert-codedoc)
+ (define-key csharp-mode-map (kbd "/") 'csharp-maybe-insert-codedoc)
;; Need the following for parse-partial-sexp to work properly with
;; verbatim literal strings Setting this var to non-nil tells
@@ -4272,10 +4263,6 @@ Key bindings:
(speedbar-add-supported-extension '(".cs"))) ;; idempotent
(c-update-modeline)
- ;; run prog-mode-hooks if available
- (if (boundp 'prog-mode-hook)
- (c-run-mode-hooks 'prog-mode-hook 'c-mode-common-hook 'csharp-mode-hook)
- (c-run-mode-hooks 'c-mode-common-hook 'csharp-mode-hook))
;; maybe do imenu scan after hook returns
(if csharp-want-imenu
@@ -4297,8 +4284,7 @@ Key bindings:
(setq beginning-of-defun-function 'csharp-move-back-to-beginning-of-defun)
;; end-of-defun-function can remain forward-sexp !!
- (set (make-local-variable 'comment-auto-fill-only-comments) t)
- )
+ (set (make-local-variable 'comment-auto-fill-only-comments) t))
(provide 'csharp-mode)
- [elpa] externals/csharp-mode 897c85a 197/459: imenu: Fix indexing of delegates., (continued)
- [elpa] externals/csharp-mode 897c85a 197/459: imenu: Fix indexing of delegates., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode fe3ca7e 200/459: Inline square-parenthesis detection., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f9122bb 208/459: Fix indentation for array collection initializers., ELPA Syncer, 2021/08/22
- [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 <=
- [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, 2021/08/22
- [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