[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode fe3ca7e 200/459: Inline square-parenthesis
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode fe3ca7e 200/459: Inline square-parenthesis detection. |
Date: |
Sun, 22 Aug 2021 13:59:26 -0400 (EDT) |
branch: externals/csharp-mode
commit fe3ca7e036b5df57f5387ab897a10d41d32e3961
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Inline square-parenthesis detection.
This was only used one place. Fixes byte-compilation regression
introduced in:
https://github.com/josteink/csharp-mode/commit/0a2a3b0943c2463ca38b673c6c42d2e3e9bc2d5a
Partially adresses:
https://github.com/josteink/csharp-mode/issues/79
---
csharp-mode.el | 43 ++++++++++---------------------------------
1 file changed, 10 insertions(+), 33 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index f5c5e47..ffa1a8e 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -558,38 +558,6 @@ to work properly with code that includes attributes.
)))
-;; essentially the same as (progn), but this this is required to avoid
-;; byte-compilation warnings due to some forms referencing this
-;; getting expanded during compilation.
-(eval-when-compile
- (defun csharp-is-square-parentasis-block-p ()
- "Attempts to safely assess if the current point is at the opening of
-a square parentasis block [ ... ]."
- (let* ((start (point)) ;; variables used to hold our position, so that we
know that
- (end)) ;; our code isn't stuck trying to look for a
non-existant sexp.
- (and (eq (char-after) 91) ;; open square
- (while (and (eq (char-after) 91)
- (not (eq start end)))
- (c-safe (c-forward-sexp 1))
- (setq end (point)))
- (eq (char-before) 93))) ;; close square
- ))
-
-;; nasty hack to silence compile-time warnings and runtime-warnings.
-;; exact copy of defun above.
-(defun csharp-is-square-parentasis-block-p ()
- "Attempts to safely assess if the current point is at the opening of
-a square parentasis block [ ... ]."
- (let* ((start (point)) ;; variables used to hold our position, so that we
know that
- (end)) ;; our code isn't stuck trying to look for a
non-existant sexp.
- (and (eq (char-after) 91) ;; open square
- (while (and (eq (char-after) 91)
- (not (eq start end)))
- (c-safe (c-forward-sexp 1))
- (setq end (point)))
- (eq (char-before) 93))) ;; close square
- )
-
;; ==================================================================
;; end of csharp-mode utility and feature defuns
;; ==================================================================
@@ -913,7 +881,16 @@ a square parentasis block [ ... ]."
(if (or
(eq (char-after) ?{) ;; open curly
- (csharp-is-square-parentasis-block-p)
+ ;; is square parenthesis block? - start
+ (let* ((start (point)) ;; used to hold our
position, so that we know that
+ (end)) ;; our code isn't
stuck trying to look for a non-existant sexp.
+ (and (eq (char-after) 91) ;; open square
+ (while (and (eq (char-after) 91)
+ (not (eq start end)))
+ (c-safe (c-forward-sexp 1))
+ (setq end (point)))
+ (eq (char-before) 93)))
+ ;; is square parenthesis block? - end
(and (eq (char-after) 40) ;; open paren
(c-safe (c-forward-sexp 1) t)))
- [elpa] externals/csharp-mode d01f22f 149/459: Imenu: fix interface-prefixed members, (continued)
- [elpa] externals/csharp-mode d01f22f 149/459: Imenu: fix interface-prefixed members, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report namespace for all types, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ed030e7 152/459: Ensure test-cases don't overlap., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c7932f9 156/459: Remove useless autoloads, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ee9125d 163/459: Fix looking-back warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f9e95d1 167/459: Ensure tests reproduce fontification bugs., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ca394f1 188/459: imenu: Fix indexing of methods in test-file., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c206dbc 191/459: extern is a modifier-keyword, not "other" keyword., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a8d8ef8 195/459: imenu: Index delegates, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 897c85a 197/459: imenu: Fix indexing of delegates., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode fe3ca7e 200/459: Inline square-parenthesis detection.,
ELPA Syncer <=
- [elpa] externals/csharp-mode f9122bb 208/459: Fix indentation for array collection initializers., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ebd67a1 209/459: Correctly indent nested generic object initializers, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5b89db2 088/459: Imenu: Correctly handle default-values in param-lists., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8ccafbc 092/459: remove unused rule and documentation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0e333c3 090/459: fontify else, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f96cf8b 089/459: remove fontification of accessors and constructors, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c097a34 093/459: add async as a function modifier, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode dd6c930 102/459: Merge pull request #43 from wasamasa/fix-major-mode-definition, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 55fe188 101/459: Use `define-derived-mode`, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c6a4ea 096/459: Add info about customization to readme., ELPA Syncer, 2021/08/22