branch: externals/csharp-mode commit d7ba765cfcbf5c0a504e41f7be6987f5bdc6dda2 Author: Jostein Kjønigsen <jost...@kjonigsen.net> Commit: Jostein Kjønigsen <jost...@kjonigsen.net>
Merge changes from devel. --- csharp-mode.el | 63 ++-------------------------------------------------------- 1 file changed, 2 insertions(+), 61 deletions(-) diff --git a/csharp-mode.el b/csharp-mode.el index b29439a..9d904ad 100644 --- a/csharp-mode.el +++ b/csharp-mode.el @@ -347,11 +347,6 @@ ;;(error (byte-compile-dest-file)) ;;(error (c-get-current-file)) - (defconst csharp-aspnet-directive-re - "<%@.+?%>" - "Regex for matching directive blocks in ASP.NET files (.aspx, .ashx, .ascx)") - - (defconst csharp-enum-decl-re (concat "\\<enum[ \t\n\r\f\v]+" @@ -413,16 +408,12 @@ A vsemi appears in 3 cases in C#: - in an object initializer, before the open-curly? - - after an ASPNET directive, that appears in a aspx/ashx/ascx file + - after an ASPNET directive, that appears in a aspx/ashx/ascx file (not supported) An example of the former is [WebMethod] or [XmlElement]. -An example of the latter is something like this: - - <%@ WebHandler Language=\"C#\" Class=\"Handler\" %> Providing this function allows the indenting in csharp-mode -to work properly with code that includes attributes and ASPNET -directives. +to work properly with code that includes attributes. " (save-excursion @@ -438,11 +429,6 @@ directives. (looking-at "[ \t\n\f\v\r]*{")) t) - ;; put a vsemi after an ASPNET directive, like - ;; <%@ WebHandler Language="C#" Class="Handler" %> - ((looking-back (concat csharp-aspnet-directive-re "$") nil t) - t) - ;; put a vsemi after an attribute, as with ;; [XmlElement] ;; Except when the attribute is used within a line of code, as @@ -1232,51 +1218,6 @@ comment at the start of cc-engine.el for more info." nil)) - ;; Case 6: directive blocks for .aspx/.ashx/.ascx - ,`((lambda (limit) - (let ((parse-sexp-lookup-properties - (cc-eval-when-compile - (boundp 'parse-sexp-lookup-properties)))) - - (while (re-search-forward csharp-aspnet-directive-re limit t) - (csharp-log 3 "aspnet template? - %d limit(%d)" (match-beginning 1) - limit) - - (unless - (progn - (goto-char (match-beginning 0)) - (c-skip-comments-and-strings limit)) - - (save-match-data - (let ((end-open (+ (match-beginning 0) 3)) - (beg-close (- (match-end 0) 2))) - (c-put-font-lock-face (match-beginning 0) - end-open - 'font-lock-preprocessor-face) - - (c-put-font-lock-face beg-close - (match-end 0) - 'font-lock-preprocessor-face) - - ;; fontify within the directive - (while (re-search-forward - ,(concat - "\\(" - (c-lang-const c-symbol-key) - "\\)" - "=?" - ) - beg-close t) - - (c-put-font-lock-face (match-beginning 1) - (match-end 1) - 'font-lock-keyword-face) - (c-skip-comments-and-strings beg-close)) - )) - (goto-char (match-end 0))))) - nil)) - - ;; ;; Case 5: #if ;; ,@(when t ;; `((,(byte-compile