branch: externals/csharp-mode commit af612545e7a332b2728678c899a51cec9c433991 Author: Vasilij Schneidermann <m...@vasilij.de> Commit: Jostein Kjønigsen <jost...@kjonigsen.net>
Fix off-by-one error for region directive comments Closes #109 --- csharp-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/csharp-mode.el b/csharp-mode.el index 7cdae41..4ccee25 100644 --- a/csharp-mode.el +++ b/csharp-mode.el @@ -1157,7 +1157,9 @@ Currently handled: (goto-char beg) (while (re-search-forward "^\\s-*#\\(region\\|pragma\\) " end t) (when (looking-at "\\w") - (put-text-property (point) (1+ (point)) + ;; mark the space separating the directive from the comment + ;; text as comment starter to allow correct word movement + (put-text-property (1- (point)) (point) 'syntax-table (string-to-syntax "< b")))))) ;; C# does generics. Setting this to t tells the parser to put