emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/haskell-tng-mode 89c5c80 223/385: improve smartparens work


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode 89c5c80 223/385: improve smartparens workaround
Date: Tue, 5 Oct 2021 23:59:35 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit 89c5c80496d33677e41e875beffdd83d059910ea
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    improve smartparens workaround
---
 haskell-tng-contrib-smartparens.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/haskell-tng-contrib-smartparens.el 
b/haskell-tng-contrib-smartparens.el
index b34fa07..23d4e29 100644
--- a/haskell-tng-contrib-smartparens.el
+++ b/haskell-tng-contrib-smartparens.el
@@ -17,10 +17,13 @@
   (sp-local-pair 'haskell-tng-mode (car pair) (cdr pair)
                  :post-handlers '(("| " "SPC"))))
 
-;; WORKAROUND smartparens is indenting all the time, which is not good
-(defun sp--indent-region (_1 _2 &optional _3)
-  ;; TODO disable this function just in this mode
-  )
+;; 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))))
 
 (add-hook
  'haskell-tng-mode-hook



reply via email to

[Prev in Thread] Current Thread [Next in Thread]