branch: externals/csharp-mode
commit 352d90e09972acb8ea37e7758aec3c226e795873
Author: Theodor Thornhill <[email protected]>
Commit: Theodor Thornhill <[email protected]>
Set c-default-style globally
This shouldn't interfere too much with the general settings of cc-modes,
but it
should allow other users to customize more freely. See #189.
---
csharp-mode.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index 2bff77a..320a1fc 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -233,6 +233,11 @@
(cpp-macro .
c-lineup-dont-change)
(substatement-open . 0)))))
+(eval-and-compile
+ (setq c-default-style
+ (cons '(csharp-mode . "csharp")
+ c-default-style)))
+
(defun csharp--color-backwards (font-lock-face)
(let (id-end)
(goto-char (1+ (match-beginning 0)))
@@ -634,9 +639,6 @@
Key bindings:
\\{csharp-mode-map}"
- (setq-local c-default-style
- (cons '(csharp-mode . "csharp")
- c-default-style))
:after-hook (c-update-modeline)
(c-initialize-cc-mode t)
(c-init-language-vars csharp-mode)