[Mono-list] Random editor question
Derek Holden
dsh2120@draper.com
Sat, 28 Jul 2001 19:48:28 -0500 (CDT)
Yeah, I've been using an emacs mode for c# for a while now.
http://www.cybercom.net/~zbrad/DotNet/Emacs/
here's the .emacs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; C# Mode support
;;;
(autoload 'csharp-mode "cc-mode")
(c-add-style "myC#Style"
'("C#"
(c-basic-offset . 8)
(c-comment-only-line-offset . (0 . 0))
(c-offsets-alist . (
(c . c-lineup-C-comments)
(inclass . +)
(namespace-open . +)
(namespace-close . 0)
(innamespace . +)
(class-open . +)
(class-close . +)
(inclass . +)
(defun-open . +)
(defun-block-intro . +)
(inline-open . -)
(statement-block-intro . +)
(statement-cont . 0)
(substatement-open . 0)
(brace-list-intro . +)
))
))
(defun my-csharp-mode-hook ()
(cond (window-system
(turn-on-font-lock)
(c-set-style "myC#Style")
)))
(add-hook 'csharp-mode-hook 'my-csharp-mode-hook)
(setq auto-mode-alist
(append '(
("\\.cs$" . csharp-mode)
) auto-mode-alist ))
(setq compilation-error-regexp-alist
(append '(
;C# Compiler
;t.cs(6,18): error SC1006: Name of constructor must match name of class
;
("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)[,]\\([0-9]+\\)): \\(error\\|warning\\) CS[0-9]+:" 1
3 4)
)
compilation-error-regexp-alist))