aboutsummaryrefslogtreecommitdiffhomepage
path: root/haskell-tab-indent.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-07-01 10:58:41 +0100
committerSean Whitton <spwhitton@spwhitton.name>2017-07-01 10:58:41 +0100
commitf21845e45135fdc240034f4e3dc0cd7f61e1bf66 (patch)
tree136ac71a0022d0196222874fceedc34d387d27b7 /haskell-tab-indent.el
parent8be1d3c5f29dff7a07d4d8cedfb2798cbf8f2a16 (diff)
downloadhaskell-tab-indent-f21845e45135fdc240034f4e3dc0cd7f61e1bf66.tar.gz
deactivate haskell-indentation-mode when activating our mode
Diffstat (limited to 'haskell-tab-indent.el')
-rw-r--r--haskell-tab-indent.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/haskell-tab-indent.el b/haskell-tab-indent.el
index 9c9d4bd..d462596 100644
--- a/haskell-tab-indent.el
+++ b/haskell-tab-indent.el
@@ -1,11 +1,11 @@
;;; haskell-tab-indent.el --- tab-based indentation for haskell-mode
-;; Copyright (C) 2015 Sean Whitton
+;; Copyright (C) 2015, 2017 Sean Whitton
;; Author: Sean Whitton <spwhitton@spwhitton.name>
;; URL: https://spwhitton.name/tech/code/haskell-tab-indent/
-;; Version: 0.1.0
-;; Package-Version: 0.1.0
+;; Version: 0.2
+;; Package-Version: 0.2
;; Keywords: indentation, haskell
;; This file is NOT part of GNU Emacs.
@@ -134,6 +134,12 @@ Binds the TAB key to cycle between possible indents."
:lighter " TabInd"
(kill-local-variable 'indent-line-function)
(when haskell-tab-indent-mode
+ ;; recent `haskell-mode' considers `haskell-indentation-mode' to
+ ;; be the default, and unconditionally turns it on. Follow recent
+ ;; `haskell-indent-mode' and turn it off when activating our mode
+ (when (and (bound-and-true-p haskell-indentation-mode)
+ (fboundp 'haskell-indentation-mode))
+ (haskell-indentation-mode 0))
(set (make-local-variable 'indent-line-function) 'haskell-tab-indent)
(set (make-local-variable 'indent-tabs-mode) t)))