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://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/103c59231303d0d5450e33df6866069cf10924f8?ds=sidebyside;hp=-c el/dot-emacs.el: Use define-derived-mode to make C# mode. This way actually does the fontification right. --- 103c59231303d0d5450e33df6866069cf10924f8 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.