@@ -558,38 +558,6 @@ to work properly with code that includes attributes.
558558 )))
559559
560560
561- ; ; essentially the same as (progn), but this this is required to avoid
562- ; ; byte-compilation warnings due to some forms referencing this
563- ; ; getting expanded during compilation.
564- (eval-when-compile
565- (defun csharp-is-square-parentasis-block-p ()
566- " Attempts to safely assess if the current point is at the opening of
567- a square parentasis block [ ... ]."
568- (let* ((start (point )) ; ; variables used to hold our position, so that we know that
569- (end)) ; ; our code isn't stuck trying to look for a non-existant sexp.
570- (and (eq (char-after ) 91 ) ; ; open square
571- (while (and (eq (char-after ) 91 )
572- (not (eq start end)))
573- (c-safe (c-forward-sexp 1 ))
574- (setq end (point )))
575- (eq (char-before ) 93 ))) ; ; close square
576- ))
577-
578- ; ; nasty hack to silence compile-time warnings and runtime-warnings.
579- ; ; exact copy of defun above.
580- (defun csharp-is-square-parentasis-block-p ()
581- " Attempts to safely assess if the current point is at the opening of
582- a square parentasis block [ ... ]."
583- (let* ((start (point )) ; ; variables used to hold our position, so that we know that
584- (end)) ; ; our code isn't stuck trying to look for a non-existant sexp.
585- (and (eq (char-after ) 91 ) ; ; open square
586- (while (and (eq (char-after ) 91 )
587- (not (eq start end)))
588- (c-safe (c-forward-sexp 1 ))
589- (setq end (point )))
590- (eq (char-before ) 93 ))) ; ; close square
591- )
592-
593561; ; ==================================================================
594562; ; end of csharp-mode utility and feature defuns
595563; ; ==================================================================
@@ -913,7 +881,16 @@ a square parentasis block [ ... ]."
913881
914882 (if (or
915883 (eq (char-after ) ?{ ) ; ; open curly
916- (csharp-is-square-parentasis-block-p)
884+ ; ; is square parenthesis block? - start
885+ (let* ((start (point )) ; ; used to hold our position, so that we know that
886+ (end)) ; ; our code isn't stuck trying to look for a non-existant sexp.
887+ (and (eq (char-after ) 91 ) ; ; open square
888+ (while (and (eq (char-after ) 91 )
889+ (not (eq start end)))
890+ (c-safe (c-forward-sexp 1 ))
891+ (setq end (point )))
892+ (eq (char-before ) 93 )))
893+ ; ; is square parenthesis block? - end
917894 (and (eq (char-after ) 40 ) ; ; open paren
918895 (c-safe (c-forward-sexp 1 ) t )))
919896
0 commit comments