From d46d5e9a4c0bd219f444a643cc07ccc268f8c4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Fayzrakhmanov=20=28=D0=90=D1=80=D1=82=D1=83=D1=80?= =?UTF-8?q?=20=D0=A4=D0=B0=D0=B9=D0=B7=D1=80=D0=B0=D1=85=D0=BC=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=29?= Date: Fri, 22 May 2015 15:38:22 +0500 Subject: [PATCH 1/2] Disable indentation overlays by default Update `haskell-indentation-mode` doc string. --- haskell-indentation.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/haskell-indentation.el b/haskell-indentation.el index 31051cef7..342533d71 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -49,7 +49,7 @@ :group 'haskell :prefix "haskell-indentation-") -(defcustom haskell-indentation-show-indentations t +(defcustom haskell-indentation-show-indentations nil "If t the current line's indentation points will be showed as underscore overlays in new haskell-mode buffers. Use `haskell-indentation-enable-show-indentations' and `haskell-indentation-disable-show-indentations' @@ -57,7 +57,7 @@ to switch the behavior for already existing buffers." :type 'boolean :group 'haskell-indentation) -(defcustom haskell-indentation-show-indentations-after-eol t +(defcustom haskell-indentation-show-indentations-after-eol nil "If t, try to show indentation points after the end of line. This requires strange overlay hacks and can collide with other modes (e.g. fill-column-indicator)." @@ -121,7 +121,14 @@ modes (e.g. fill-column-indicator)." "Haskell indentation mode that deals with the layout rule. It rebinds RET, DEL and BACKSPACE, so that indentations can be set and deleted as if they were real tabs. It supports -autofill-mode." +autofill-mode. + +It is possible to render indent stops for current line as +overlays. Please read documentation for option +`haskell-indentation-enable-show-indentations' and option +`haskell-indentation-show-indentations-after-eol'. These options +were disabled by default because in most cases occurs overlay +clashing with other modes." :lighter " Ind" :keymap haskell-indentation-mode-map (kill-local-variable 'indent-line-function) From cfe5c6ed3a35a6a98d31880d7e053dd79fd46163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Fayzrakhmanov=20=28=D0=90=D1=80=D1=82=D1=83=D1=80?= =?UTF-8?q?=20=D0=A4=D0=B0=D0=B9=D0=B7=D1=80=D0=B0=D1=85=D0=BC=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=29?= Date: Fri, 22 May 2015 15:38:47 +0500 Subject: [PATCH 2/2] Code cleanup --- haskell-indentation.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/haskell-indentation.el b/haskell-indentation.el index 342533d71..14002e9a5 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -52,8 +52,9 @@ (defcustom haskell-indentation-show-indentations nil "If t the current line's indentation points will be showed as underscore overlays in new haskell-mode buffers. Use -`haskell-indentation-enable-show-indentations' and `haskell-indentation-disable-show-indentations' -to switch the behavior for already existing buffers." +`haskell-indentation-enable-show-indentations' and +`haskell-indentation-disable-show-indentations' to switch the +behavior for already existing buffers." :type 'boolean :group 'haskell-indentation) @@ -663,7 +664,7 @@ the current buffer." (defun haskell-indentation-declaration-layout () (haskell-indentation-layout #'haskell-indentation-declaration)) -;; a layout list with case expressions +;; a layout list with case expressions (defun haskell-indentation-case-layout () (haskell-indentation-layout #'haskell-indentation-case)) @@ -912,7 +913,7 @@ the current buffer." (throw 'parse-end nil)) ;; after an 'open' expression such as 'if', exit - (unless (member (car parser) '("(" "[" "{" "do" "case")) + (unless (member (car parser) '("(" "[" "{" "do" "case")) (throw 'return nil))))))))) (defun haskell-indentation-test-indentations () @@ -968,7 +969,7 @@ the current buffer." ;; and current-indent after the separator ;; For example: ;; l = [ 1 -;; , 2 +;; , 2 ;; , -- start now here (defun haskell-indentation-at-separator ()