From 103c59231303d0d5450e33df6866069cf10924f8 Mon Sep 17 00:00:00 2001 Message-Id: <103c59231303d0d5450e33df6866069cf10924f8.1718380492.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 23 Oct 2009 16:46:04 +0100 Subject: [PATCH] el/dot-emacs.el: Use define-derived-mode to make C# mode. Organization: Straylight/Edgeware From: Mark Wooding This way actually does the fontification right. --- el/dot-emacs.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 751f3ed..f7cadd9 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -1229,13 +1229,8 @@ (defun mdw-fontify-csharp () (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" '(0 mdw-punct-face)))))) -(defun csharp-mode () - (interactive) - (java-mode) - (setq major-mode 'csharp-mode) - (setq mode-name "C#") - (mdw-fontify-csharp) - (run-hooks 'csharp-mode-hook)) +(define-derived-mode csharp-mode java-mode "C#" + "Major mode for editing C# code.") ;;;-------------------------------------------------------------------------- ;;; Awk programming configuration. -- [mdw]