From f21845e45135fdc240034f4e3dc0cd7f61e1bf66 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 1 Jul 2017 10:58:41 +0100 Subject: deactivate haskell-indentation-mode when activating our mode --- haskell-tab-indent.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'haskell-tab-indent.el') 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 ;; 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))) -- cgit v1.2.3