branch: externals/csharp-mode commit 03e6200e2c67fee4ff569a449ff71afae6da63b4 Author: Jostein Kjønigsen <jost...@kjonigsen.net> Commit: Jostein Kjønigsen <jost...@kjonigsen.net>
Emacs: Tentative fix for fontification issues. This commit makes Emacs treat # as a class-b comment-starter and newline as class-b comment-ender. This make Emacs not treat #region-statements as computational expressions where quotes makes text being treated as string or char-arrays. This should mean you can write \#region the class's main logic resides here Without having the next lines treated as part of a huge char-array. --- csharp-mode.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csharp-mode.el b/csharp-mode.el index 105d4db..e077423 100644 --- a/csharp-mode.el +++ b/csharp-mode.el @@ -4220,6 +4220,12 @@ Key bindings: ;; define underscore as part of a word in the Csharp syntax table (modify-syntax-entry ?_ "w" csharp-mode-syntax-table) + ;; ensure #region and #pragma directives are not treated as computational + ;; expressions and thus wont have string and character rules applied to + ;; them. + (modify-syntax-entry ?# "< b" csharp-mode-syntax-table) + (modify-syntax-entry ?\n "> b" csharp-mode-syntax-table) + ;; define @ as an expression prefix in Csharp syntax table (modify-syntax-entry ?@ "'" csharp-mode-syntax-table)