From: Mark Wooding Date: Fri, 23 Oct 2009 15:46:04 +0000 (+0100) Subject: el/dot-emacs.el: Use define-derived-mode to make C# mode. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/103c59231303d0d5450e33df6866069cf10924f8?hp=f0dbee8416370ef2909b0e3bcccc169d4cf4e3f3 el/dot-emacs.el: Use define-derived-mode to make C# mode. This way actually does the fontification right. --- 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 @@ doesn't match any of the regular expressions in (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.