aboutsummaryrefslogtreecommitdiffhomepage
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
parent8be1d3c5f29dff7a07d4d8cedfb2798cbf8f2a16 (diff)
downloadhaskell-tab-indent-f21845e45135fdc240034f4e3dc0cd7f61e1bf66.tar.gz
deactivate haskell-indentation-mode when activating our mode
-rw-r--r--debian/changelog9
-rw-r--r--haskell-tab-indent.el12
2 files changed, 18 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 0029d7a..dca8adf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+haskell-tab-indent (0.2) UNRELEASED; urgency=medium
+
+ * Deactivate haskell-indentation-mode when activating haskell-tab-indent-mode.
+ Recent haskell-mode considers haskell-indentation-mode to be the
+ default, activating it unconditionally. We follow haskell-indent-mode
+ in deactivating it when activating our mode.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Sat, 01 Jul 2017 10:56:46 +0100
+
haskell-tab-indent (0.1.0) unstable; urgency=medium
* Initial release.
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)))