[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 239527c 263/459: Protect dmode from ccmode
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 239527c 263/459: Protect dmode from ccmode monkeypatch (#134) |
Date: |
Sun, 22 Aug 2021 13:59:40 -0400 (EDT) |
branch: externals/csharp-mode
commit 239527c1f27cf5246505f1faf23269487fdbfdd2
Author: Nathan Moreau <nathan.moreau@m4x.org>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Protect dmode from ccmode monkeypatch (#134)
* Try not to patch cc-mode functions globally.
Fix #133.
---
csharp-mode.el | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index 9583878..06b62d8 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -2508,7 +2508,17 @@ are the string substitutions (see `format')."
t)
(c-put-font-lock-face start (1+ start) 'font-lock-warning-face)))))
-(defun c-looking-at-inexpr-block (lim containing-sexp &optional check-at-end)
+(advice-add 'c-looking-at-inexpr-block
+ :around 'csharp--c-looking-at-inexpr-block-hack)
+
+(defun csharp--c-looking-at-inexpr-block-hack (orig-fun &rest args)
+ (apply
+ (if (eq major-mode 'csharp-mode)
+ #'csharp--c-looking-at-inexpr-block
+ orig-fun)
+ args))
+
+(defun csharp--c-looking-at-inexpr-block (lim containing-sexp &optional
check-at-end)
;; Return non-nil if we're looking at the beginning of a block
;; inside an expression. The value returned is actually a cons of
;; either 'inlambda, 'inexpr-statement or 'inexpr-class and the
@@ -3067,10 +3077,10 @@ Key bindings:
;; The paragraph-separate variable was getting stomped by
;; other hooks, so it must reside here.
- (setq paragraph-separate
- "[ \t]*\\(//+\\|\\**\\)\\([ \t]+\\|[ \t]+<.+?>\\)$\\|^\f")
+ (setq-local paragraph-separate
+ "[ \t]*\\(//+\\|\\**\\)\\([ \t]+\\|[ \t]+<.+?>\\)$\\|^\f")
- (setq beginning-of-defun-function 'csharp-move-back-to-beginning-of-defun)
+ (setq-local beginning-of-defun-function
'csharp-move-back-to-beginning-of-defun)
;; `end-of-defun-function' can remain forward-sexp !!
(set (make-local-variable 'comment-auto-fill-only-comments) t)
@@ -3098,4 +3108,3 @@ Key bindings:
(provide 'csharp-mode)
;;; csharp-mode.el ends here
-
- [elpa] externals/csharp-mode d39d9ac 241/459: Revert "Make csharp-mode-map inherit from prog-mode-map", (continued)
- [elpa] externals/csharp-mode d39d9ac 241/459: Revert "Make csharp-mode-map inherit from prog-mode-map", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0027f9c 246/459: Issue #112: Allow whitespace after the `#` in a directive., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode bd54e4d 250/459: Add csharp group definition, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 331b45d 251/459: Try fix/update CI-settings, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 85ae15d 252/459: Hacky formatting trick to make codedoc work with Omnisharp defaults, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 461cd87 254/459: Fix compilation error on Emacs 26., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ba7a81a 253/459: Advise c-inside-bracelist-p (#122), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5bfd3d2 257/459: Fix fontification of namespaces in using-statements., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 561c359 258/459: Fix fontification in Emacs27., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c66916e 259/459: Update version/meta-data., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 239527c 263/459: Protect dmode from ccmode monkeypatch (#134),
ELPA Syncer <=
- [elpa] externals/csharp-mode f3aff25 261/459: Try to properly silence warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 643c63e 268/459: Highlight "value" as a constant., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode fcd092d 266/459: Add Emacs 26 to CI., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2381280 269/459: Remove excess (incorrect) comment., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 30ae136 277/459: Merge pull request #150 from josteink/josteink-CI-fix, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 57bd21b 279/459: Merge pull request #152 from DamienCassou/typos, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 31124db 281/459: Merge pull request #156 from krzsztf/fix-lambda-indentation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ff4111e 278/459: Fix typos, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9c596c9 283/459: Advice to override only in csharp-mode, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 617dd6d 284/459: Ensure ad-do-it is called on else branch, ELPA Syncer, 2021/08/22