[Mono-list] emacs/xemacs C# mode?

Miguel de Icaza miguel@ximian.com
09 Feb 2002 23:15:23 -0500


> I'm sure some people here are using emacs to write C# code. What
> mode do you use? Is there a modified c-mode available?

I use Java mode to edit C#, it is pretty much the same (but I am sure
the C# mode maybe better, I have just been lazy to deploy it).

Here is what I have in my .emacs:

(defun fix-java-mode ()
  (define-key java-mode-map "\C-m" 'newline-and-indent)
  (c-set-style "linux")
  (custom-set-variables '(c-basic-offset 8)))
(add-hook 'java-mode-hook 'fix-java-mode)
(setq auto-mode-alist (cons '("\\.cs\\'" . java-mode) auto-mode-alist))

Miguel