Skip to content

Obsolete turn-on/off-hi #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions doc/haskell-mode.texi
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ trade-offs:

@ftable @code

@item turn-on-haskell-simple-indent
@item haskell-simple-indent-mode

A very simple indentation scheme; In this scheme, @key{TAB} will now
move the cursor to the next indent point in the previous non-blank line.
An indent point is a non-whitespace character following whitespace.

@item turn-on-haskell-indent
@item haskell-indent-mode

Intelligent semi-automatic indentation for Haskell's layout rule. The
basic idea is to have @key{TAB} cycle through possibilities indentation
Expand All @@ -282,28 +282,28 @@ detail in the article @cite{Dynamic tabbing for automatic indentation
with the layout rule} published in the Journal of Functional Programming
8.5 (1998).

@item turn-on-haskell-indentation
@item haskell-indentation-mode

Improved variation of @code{turn-on-haskell-indent} indentation
Improved variation of @code{haskell-indent-mode} indentation
mode. Rebinds @key{RET} and @key{DEL}, so that indentations can be set
and deleted as if they were real tabs.

@end ftable

To enable one of these three mutually exclusive indentation schemes, you
just need call one (and only one!) of the @code{turn-on-*} commands
just need call one (and only one!) of the @code{*-mode} commands
while in the buffer you want the indentation scheme to be activated for.

The recommended way is to add one of @code{turn-on-*} commands to
The recommended way is to add one of @code{*-mode} commands to
@code{haskell-mode-hook}. This can be done either by using @kbd{M-x
customize-variable @key{RET} haskell-mode-hook} which provides a
convenient user interface or by adding @emph{one} of the following three
lines to your @file{.emacs} file:

@lisp
(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(add-hook 'haskell-mode-hook 'haskell-simple-indent-mode)
(add-hook 'haskell-mode-hook 'haskell-indent-mode)
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
@end lisp

@section Interactive Block Indentation
Expand Down Expand Up @@ -351,7 +351,6 @@ selection mode (without redefining @kbd{C-x},@kbd{C-c},@kbd{C-v}, and
@node Declaration scanning
@chapter Declaration scannning

@findex turn-on-haskell-decl-scan
@findex haskell-decl-scan-mode
@vindex haskell-decl-scan-mode-hook

Expand Down Expand Up @@ -391,11 +390,11 @@ Lock,,,emacs}) as @code{haskell-decl-scan-mode} ignores text highlighted
with @code{font-lock-comment-face}.

As usual, in order to activate @code{haskell-decl-scan-mode}
automatically for Haskell buffers, add @code{turn-on-haskell-decl-scan}
automatically for Haskell buffers, add @code{haskell-decl-scan-mode}
to @code{haskell-mode-hook}:

@lisp
(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
(add-hook 'haskell-mode-hook 'haskell-decl-scan-mode)
@end lisp

@code{haskell-decl-scan-mode} enables the use of features that build
Expand Down
5 changes: 4 additions & 1 deletion haskell-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
;; To turn indentation on for all Haskell buffers under Haskell mode
;; <http://www.haskell.org/haskell-mode/> add this to .emacs:
;;
;; (add-hook haskell-mode-hook 'turn-on-haskell-indentation)
;; (add-hook haskell-mode-hook 'haskell-indentation-mode)
;;
;; Otherwise, call `haskell-indentation-mode'.

Expand Down Expand Up @@ -147,6 +147,9 @@ clashing with other modes."
"Turn on the haskell-indentation minor mode."
(interactive)
(haskell-indentation-mode t))
(make-obsolete 'turn-on-haskell-indentation
'haskell-indentation-mode
"2015-05-25")

(defun haskell-indentation-parse-error (&rest args)
(let ((msg (apply 'format args)))
Expand Down