@@ -2968,20 +2968,21 @@ Key bindings:
29682968 ; ; customized values for our language.
29692969 (c-init-language-vars csharp-mode)
29702970
2971- ; ; Set style to c# style unless a file local variable or default
2972- ; ; style is found, in which case it should be set after
2973- ; ; calling `c-common-init' below.
2974- (unless (or c-file-style
2975- (stringp c-default-style)
2976- (assq 'csharp-mode c-default-style))
2977- (c-set-style " C#" 'do-not-override-customized-values ))
2978-
2979- ; ; `c-common-init' initializes most of the components of a CC Mode
2980- ; ; buffer, including setup of the mode menu, font-lock, etc.
2981- ; ; There's also a lower level routine `c-basic-common-init' that
2982- ; ; only makes the necessary initialization to get the syntactic
2983- ; ; analysis and similar things working.
2984- (c-common-init 'csharp-mode )
2971+ ; ; Use our predefined "C#" style unless a file local or default
2972+ ; ; style is found. This is done by rebinding `c-default-style'
2973+ ; ; during the `c-common-init' call. 'c-common-init' will initialize
2974+ ; ; the buffer's style using the value of `c-default-style' .
2975+ (let ((c-default-style (if (or c-file-style
2976+ (stringp c-default-style)
2977+ (assq 'csharp-mode c-default-style))
2978+ c-default-style
2979+ " C#" )))
2980+ ; ; `c-common-init' initializes most of the components of a CC Mode
2981+ ; ; buffer, including setup of the mode menu, font-lock, etc.
2982+ ; ; There's also a lower level routine `c-basic-common-init' that
2983+ ; ; only makes the necessary initialization to get the syntactic
2984+ ; ; analysis and similar things working.
2985+ (c-common-init 'csharp-mode ))
29852986
29862987 (define-key csharp-mode-map (kbd " /" ) 'csharp-maybe-insert-codedoc )
29872988
0 commit comments