Skip to content

Commit

Permalink
Clarify the documentation, remove the haskell-indent-mode autoload
Browse files Browse the repository at this point in the history
Ignore-this: 96a63e2fa3e5fdcc6dfbf9ec311377e0

darcs-hash:20091025184022-f57bf-6192229ad5d78cc67bc43f7aafa7892ea5ed0e51.gz
  • Loading branch information
svein.ove committed Oct 25, 2009
1 parent d5155f4 commit 72d395f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 57 deletions.
3 changes: 3 additions & 0 deletions README
Expand Up @@ -31,6 +31,9 @@ Otherwise:

(load "~/lib/emacs/haskell-mode/haskell-site-file")

This only loads the bare-bones haskell-mode. To make it useful, you
need additional modules; you can use the haskell customize-group
to edit the Haskell mode hook or, if you prefer manual setup, try
adding the following lines according to which modules you want to use:

(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
Expand Down
7 changes: 6 additions & 1 deletion haskell-indentation.el
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 'haskell-indentation-mode)
;; (add-hook haskell-mode-hook 'turn-on-haskell-indentation)
;;
;; Otherwise, call `haskell-indentation-mode'.
;;
Expand Down Expand Up @@ -88,6 +88,11 @@ autofill-mode."
(set (make-local-variable 'normal-auto-fill-function)
'haskell-indentation-auto-fill-function)))

(defun turn-on-haskell-indentation ()
"Turn on the haskell-indentation minor mode"
(interactive)
(haskell-indentation-mode t))

(defun kill-indented-line (&optional arg)
"`kill-line' for indented text.
Preserves indentation and removes extra whitespace"
Expand Down
55 changes: 6 additions & 49 deletions haskell-mode.el
Expand Up @@ -65,50 +65,6 @@
;; This mode supports full Haskell 1.4 including literate scripts.
;; In some versions of (X)Emacs it may only support Latin-1, not Unicode.
;;
;; Installation:
;;
;; Put in your ~/.emacs:
;;
;; (setq auto-mode-alist
;; (append auto-mode-alist
;; '(("\\.[hg]s$" . haskell-mode)
;; ("\\.hi$" . haskell-mode)
;; ("\\.l[hg]s$" . literate-haskell-mode))))
;;
;; (autoload 'haskell-mode "haskell-mode"
;; "Major mode for editing Haskell scripts." t)
;; (autoload 'literate-haskell-mode "haskell-mode"
;; "Major mode for editing literate Haskell scripts." t)
;;
;; with `haskell-mode.el' accessible somewhere on the load-path.
;; To add a directory `~/lib/emacs' (for example) to the load-path,
;; add the following to .emacs:
;;
;; (setq load-path (cons "~/lib/emacs" load-path))
;;
;; To turn any of the supported modules on for all buffers, add the
;; appropriate line(s) to .emacs:
;;
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;
;; Make sure the module files are also on the load-path. Note that
;; the three indentation modules are mutually exclusive: Use only one.
;;
;;
;; Customisation:
;;
;; Set the value of `haskell-literate-default' to your preferred
;; literate style: `bird' or `tex', within .emacs as follows:
;;
;; (setq haskell-literate-default 'tex)
;;
;; Also see the customisations of the modules.
;;
;;
;; History:
;;
;; This mode is based on an editing mode by Simon Marlow 11/1/92
Expand Down Expand Up @@ -421,10 +377,10 @@ May return a qualified name."
;; Various mode variables.

(defcustom haskell-mode-hook nil
"Hook run after entering Haskell mode."
"Hook run after entering Haskell mode. Do not select more than one of the three indentation modes."
:type 'hook
:options '(turn-on-haskell-indent turn-on-font-lock turn-on-eldoc-mode
imenu-add-menubar-index))
:options '(turn-on-haskell-indent turn-on-haskell-indentation turn-on-font-lock turn-on-eldoc-mode
turn-on-simple-indent turn-on-haskell-doc-mode imenu-add-menubar-index))

(defvar eldoc-print-current-symbol-info-function)

Expand All @@ -447,6 +403,9 @@ are supported with an `autoload' command:
`haskell-doc', Hans-Wolfgang Loidl
Echoes types of functions or syntax of keywords when the cursor is idle.
`haskell-indentation', Kristof Bastiaensen
Intelligent semi-automatic indentation Mk2
`haskell-indent', Guy Lapalme
Intelligent semi-automatic indentation.
Expand Down Expand Up @@ -513,8 +472,6 @@ Invokes `haskell-mode-hook'."

;;;###autoload(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode))
;;;###autoload(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode))
;;;###autoload(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;;;###autoload(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)

(defcustom haskell-hoogle-command
(if (executable-find "hoogle") "hoogle")
Expand Down
15 changes: 8 additions & 7 deletions haskell-site-file.el
Expand Up @@ -138,7 +138,7 @@ Invokes `haskell-indent-hook' if not nil.
;;;***

;;;### (autoloads (haskell-indentation-mode) "haskell-indentation"
;;;;;; "haskell-indentation.el" (19171 24743))
;;;;;; "haskell-indentation.el" (19172 38780))
;;; Generated autoloads from haskell-indentation.el

(autoload 'haskell-indentation-mode "haskell-indentation" "\
Expand All @@ -152,7 +152,7 @@ autofill-mode.
;;;***

;;;### (autoloads (haskell-hoogle literate-haskell-mode haskell-mode)
;;;;;; "haskell-mode" "haskell-mode.el" (19172 23932))
;;;;;; "haskell-mode" "haskell-mode.el" (19172 39700))
;;; Generated autoloads from haskell-mode.el

(autoload 'haskell-mode "haskell-mode" "\
Expand All @@ -172,6 +172,9 @@ are supported with an `autoload' command:
`haskell-doc', Hans-Wolfgang Loidl
Echoes types of functions or syntax of keywords when the cursor is idle.
`haskell-indentation', Kristof Bastiaensen
Intelligent semi-automatic indentation Mk2
`haskell-indent', Guy Lapalme
Intelligent semi-automatic indentation.
Expand All @@ -196,8 +199,6 @@ As `haskell-mode' but for literate scripts.
\(fn)" t nil)
(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode))
(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode))
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)

(autoload 'haskell-hoogle "haskell-mode" "\
Do a Hoogle search for QUERY.
Expand Down Expand Up @@ -262,9 +263,9 @@ we load it.

;;;***

;;;### (autoloads nil nil ("foo.el" "haskell-font-lock.el" "haskell-ghci.el"
;;;;;; "haskell-hugs.el" "haskell-simple-indent.el") (19172 24370
;;;;;; 539590))
;;;### (autoloads nil nil ("haskell-font-lock.el" "haskell-ghci.el"
;;;;;; "haskell-hugs.el" "haskell-simple-indent.el") (19172 39728
;;;;;; 795831))

;;;***

Expand Down

0 comments on commit 72d395f

Please sign in to comment.