[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 8f4d7fc 225/385: advice around smartparen
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 8f4d7fc 225/385: advice around smartparens workaround |
Date: |
Tue, 5 Oct 2021 23:59:36 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 8f4d7fc93e70678eb2e67f47b03123bcbbd7f6b9
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
advice around smartparens workaround
---
haskell-tng-contrib-smartparens.el | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/haskell-tng-contrib-smartparens.el
b/haskell-tng-contrib-smartparens.el
index a8ffc11..7945f5d 100644
--- a/haskell-tng-contrib-smartparens.el
+++ b/haskell-tng-contrib-smartparens.el
@@ -17,14 +17,11 @@
(sp-local-pair 'haskell-tng-mode (car pair) (cdr pair)
:post-handlers '(("| " "SPC"))))
-;; TODO use advise instead of redefining the function
-;; WORKAROUND smartparens indenting all the time
-(defun sp--indent-region (start end &optional column)
- (unless (or
- (bound-and-true-p haskell-tng-mode)
- (bound-and-true-p aggressive-indent-mode))
- (cl-letf (((symbol-function 'message) #'ignore))
- (indent-region start end column))))
+(advice-add #'sp--indent-region :around #'haskell-tng--contrib-sp-indent)
+(defun haskell-tng--contrib-sp-indent (f &rest args)
+ "Disables `sp--indent-region' locally."
+ (unless (eq major-mode 'haskell-tng-mode)
+ (apply f args)))
(add-hook
'haskell-tng-mode-hook
- [nongnu] elpa/haskell-tng-mode 9359c7b 349/385: cl-loop, (continued)
- [nongnu] elpa/haskell-tng-mode 9359c7b 349/385: cl-loop, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f5d76fc 348/385: tidy docs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3b37524 360/385: bugfix for qualified imports when the cache was bad, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fe2b164 372/385: fix the build, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 63225d5 374/385: use .ghc.path to find hsinspect, build tool agnostic, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3d1122b 116/385: notes on regexps, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c3793b2 176/385: canonical until macro, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b7cb5b9 214/385: starting to create imenu, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5306ae2 217/385: fix type faces with constraints, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5f81d6b 219/385: bump python version, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8f4d7fc 225/385: advice around smartparens workaround,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 4cbf702 205/385: move third party deps to -contrib, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3ff278e 227/385: ability to not continue comments, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode dbcef71 235/385: workaround the env file situation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5892c04 232/385: small things, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 44dc467 248/385: notes on motivation, contributing and collaboration, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6f2b5ee 266/385: font lock CPP, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fdbd0a2 239/385: updates for hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b2e2c3a 293/385: stop stack from being an asshole, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ee07f6d 172/385: type indentation tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 59354b6 198/385: support hanging type alignment, ELPA Syncer, 2021/10/06