emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/csharp-mode 03e6200 109/459: Emacs: Tentative fix for f


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode 03e6200 109/459: Emacs: Tentative fix for fontification issues.
Date: Sun, 22 Aug 2021 13:59:07 -0400 (EDT)

branch: externals/csharp-mode
commit 03e6200e2c67fee4ff569a449ff71afae6da63b4
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]