branch: externals/csharp-mode
commit 5a9c8eb2e851f0ba1f5d94548afab9381e6da7bc
Merge: 4885177 617dd6d
Author: Jostein Kjønigsen <jost...@kjonigsen.net>
Commit: GitHub <nore...@github.com>

    Merge pull request #159 from ronnieholm/master
    
    Fix font lock breaks on strings #151
---
 csharp-mode.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/csharp-mode.el b/csharp-mode.el
index 7793072..2ba3339 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -2466,6 +2466,17 @@ are the string substitutions (see `format')."
     ad-do-it)
   )
 
+(defadvice c-clear-string-fences (around
+                                  csharp-disable-clear-string-fences
+                                  compile activate)
+  "This turns off `c-clear-string-fences' for `csharp-mode'. When
+on for `csharp-mode' font lock breaks after an interpolated
+string or terminating simple string."
+  (if (c-major-mode-is 'csharp-mode)
+      nil
+    ad-do-it)
+  )
+
 ;; ==================================================================
 ;; end of C#-specific optimizations of cc-mode funcs
 ;; ==================================================================

Reply via email to