Skip to content

Commit e402e77

Browse files
committed
Merge pull request #1233 from geraldus/g/fix-1184-static-tags-completions
Small docs improvements
2 parents 3652414 + 1c66d26 commit e402e77

File tree

1 file changed

+47
-41
lines changed

1 file changed

+47
-41
lines changed

doc/haskell-mode.texi

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ gmane.comp.lang.haskell.emacs} newsgroup.
117117
If you have discovered a bug or wish to request a new feature, you can
118118
@uref{https://github.com/haskell/haskell-mode/issues/new, file a new
119119
issue} with Haskell Mode's issue tracker. When filing a bug, please
120-
state your currently used software version (@kbd{M-x haskell-version},
121-
@kbd{M-x version}) and what steps to perform in order to reproduce the
122-
bug you're experiencing. Finally, if you happen to be proficient in
123-
@ref{Top,Emacs Lisp,,elisp} you are welcome to submit patches via
124-
@uref{https://help.github.com/articles/using-pull-requests, GitHub Pull
125-
Requests}.
120+
state your currently used software version (@kbd{M-x}
121+
@code{haskell-version}, @kbd{M-x} @code{version}) and what steps to
122+
perform in order to reproduce the bug you're experiencing. Finally, if
123+
you happen to be proficient in @ref{Top,Emacs Lisp,,elisp} you are
124+
welcome to submit patches via
125+
@uref{https://help.github.com/articles/using-pull-requests, GitHub
126+
Pull Requests}.
126127

127128
@node Getting Started
128129
@chapter Getting Started
@@ -146,29 +147,30 @@ Make sure you have this in your @uref{http://www.gnu.org/software/emacs/manual/h
146147

147148
Then run Emacs, and evaluate:
148149

149-
@code{M-x package-refresh-contents}
150+
@kbd{M-x} @code{package-refresh-contents}
150151

151152
and then follow by
152153

153-
@code{M-x package-install RET haskell-mode}
154+
@kbd{M-x} @code{package-install} @kbd{RET} @code{haskell-mode}
154155

155-
Voila! @code{haskell-mode} is installed! You should be able to edit Haskell
156-
source code in color now.
156+
Voila! @code{haskell-mode} is installed! You should be able to edit
157+
Haskell source code in color now.
157158

158159
@section Installation - more information
159160

160161
@code{haskell-mode} supports GNU Emacs versions 24 and upcoming 25
161162
(snapshot).
162163

163-
@code{haskell-mode} is available from @uref{http://stable.melpa.org,melpa-stable (releases)} and @uref{http://melpa.org, melpa
164-
(git snapshots)}.
164+
@code{haskell-mode} is available from
165+
@uref{http://stable.melpa.org,melpa-stable (releases)} and
166+
@uref{http://melpa.org, melpa (git snapshots)}.
165167

166168
Other means of obtaining @code{haskell-mode} include
167169
@uref{https://github.com/dimitri/el-get, el-get},
168170
@uref{https://github.com/bbatsov/prelude, Emacs Prelude} and @uref{https://packages.debian.org/search?keywords=haskell-mode, Debian package}.
169171

170-
Last version of @code{haskell-mode} that supported Emacs 23 is @code{haskell-mode}
171-
13.18 available at
172+
Last version of @code{haskell-mode} that supported Emacs 23 is
173+
@code{haskell-mode} 13.18 available at
172174
@uref{https://github.com/haskell/haskell-mode/releases/tag/v13.18}.
173175

174176
@section Customizing
@@ -200,17 +202,17 @@ customize-variable @key{RET} haskell-mode-hook}.
200202
@dfn{Haskell Mode} is actually a collection of so-called major
201203
modes@footnote{for more information about the concept of @dfn{major
202204
modes} @pxref{Major Modes,,,emacs}} one of which is called
203-
@code{haskell-mode}. To avoid confusion, when referring to this package
204-
the name ``Haskell mode'' is written in a normal font, whereas when
205-
referring the major mode of the same name @code{haskell-mode} written
206-
with a dash in-between in a typewriter font is used.
205+
@code{haskell-mode}. To avoid confusion, when referring to this
206+
package the name ``Haskell mode'' is written in a normal font, whereas
207+
when referring the major mode of the same name @code{haskell-mode}
208+
written with a dash in-between in a typewriter font is used.
207209

208210
As one might guess, @code{haskell-mode} is the (programming
209-
language@footnote{@code{haskell-mode} is derived from @code{prog-mode}})
210-
major mode for editing (non-literate) Haskell source
211-
code. @code{haskell-mode} is associated with the file extensions listed
212-
below by default@footnote{for more information about file associations,
213-
@pxref{Choosing Modes,,,emacs}}.
211+
language@footnote{@code{haskell-mode} is derived from
212+
@code{prog-mode}}) major mode for editing (non-literate) Haskell
213+
source code. @code{haskell-mode} is associated with the file
214+
extensions listed below by default@footnote{for more information about
215+
file associations, @pxref{Choosing Modes,,,emacs}}.
214216

215217
@table @file
216218
@item .hs
@@ -267,7 +269,7 @@ There are a few functions for managing imports.
267269

268270
To jump to your import list, run
269271

270-
@code{M-x haskell-navigate-imports}
272+
@kbd{M-x} @code{haskell-navigate-imports}
271273

272274
It's nicer to have a keybinding to do this, for example:
273275

@@ -282,30 +284,31 @@ cycle.
282284

283285
To generally format (sort, align) your imports, you can run
284286

285-
@code{M-x haskell-mode-format-imports}
287+
@kbd{M-x} @code{haskell-mode-format-imports}
286288

287289
Or @kbd{C-c C-.}.
288290

289291
@subsection Sort imports
290292

291293
To just sort imports, jump to an import section and run
292294

293-
@code{M-x haskell-sort-imports}
295+
@kbd{M-x} @code{haskell-sort-imports}
294296

295297
@subsection Align imports
296298

297299
To just align imports, jump to an import section and run
298300

299-
@code{M-x haskell-align-imports}
301+
@kbd{M-x} @code{haskell-align-imports}
300302

301303
@subsection stylish-haskell
302304

303305
As an alternative to the elisp functions described above, haskell-mode
304-
can use the program @url{
305-
http://hackage.haskell.org/package/stylish-haskell, stylish-haskell}
306-
to format imports. You can set this behavior by typing: @kbd{M-x}
307-
@code{customize-variable} @kbd{RET} @code{haskell-stylish-on-save}.
308-
You can install @code{stylish-haskell} by running @code{stack install
306+
can use the program
307+
@url{http://hackage.haskell.org/package/stylish-haskell,
308+
stylish-haskell} to format imports. You can set this behavior by
309+
typing: @kbd{M-x} @code{customize-variable} @kbd{RET}
310+
@code{haskell-stylish-on-save}. You can install
311+
@code{stylish-haskell} by running @code{stack install
309312
stylish-haskell}, or if you have not installed @code{stack},
310313
@code{cabal install stylish-haskell}.
311314

@@ -323,20 +326,22 @@ Haskell buffers only).
323326

324327
@section Completion support
325328

326-
@code{haskell-mode} can complete symbols, pragma directives and
327-
language extensions out-of-box. @code{haskell-mode} completes
328-
identifiers using tags (see @xref{Tags}), however you can get more
329-
precise completions with @code{haskell-interactive-mode}. In
330-
interactive mode completion candidates are produced by querying GHCi
331-
REPL.
329+
@code{haskell-mode} can complete symbols, pragma directives, language
330+
extensions, and language keywords out-of-box. @code{haskell-mode}
331+
completes identifiers (symbols) using tags (see ``Tags''), however you
332+
can get more precise completions with @code{haskell-interactive-mode}.
333+
In interactive mode completion candidates are produced by querying
334+
GHCi REPL.
332335

333336
@ifhtml
334337
@image{anim/company-mode-language-pragma}
335338
@end ifhtml
336339

337-
If haskell-interactive-mode is enabled and working haskell mode
340+
If @code{haskell-interactive-mode} is enabled and working Haskell mode
338341
provides completions for import statements taking into account
339-
currently loaded and available packages.
342+
currently loaded and available packages. Also it completes symbols
343+
querying REPL with @code{:complete} command, hence completion
344+
candidate list also includes symbols from imported modules.
340345

341346
@ifhtml
342347
@image{anim/company-mode-import-statement}
@@ -352,7 +357,8 @@ completion candidates from completion-at-point function
352357
@code{company-mode} provides special backend for dabbrev code
353358
completions, namely @code{company-dabbrev-code}. To combine
354359
completions from diffrent backends you can create grouped backends, it
355-
is very easy — a grouped backend is just a list of backends:
360+
is very easy — a grouped backend is just a list of backends, for
361+
example:
356362

357363
@lisp
358364
(add-hook 'haskell-mode-hook

0 commit comments

Comments
 (0)