Closed iquiw closed 11 years ago
It causes "assignment to free variable" warning at byte compile, but it is not harmful, I think.
The warning can be avoided by using eval-after-load
, but I don't know we should do.
(eval-after-load 'hi2
'(progn
(setq hi2-layout-offset 4
hi2-left-offset 4
hi2-ifte-offset 4)))
Maybe, better to keep this pending until someone gives an advice?
Maybe, better to keep this pending until someone gives an advice?
Sounds good.
@iquiw eval-after-load
should be perfectly fine, as it makes sure the setq
is evaluated as soon as hi2
gets loaded (and thus the defcustom
s declaring the variables have been seen).
However, the progn
is not needed here, as setq
is a single command, i.e. just use
(eval-after-load 'hi2
'(setq hi2-layout-offset 4
hi2-left-offset 4
hi2-ifte-offset 4))
@tibbe why did you add that global(!) tab-width
override?
why did you add that global(!) tab-width override?
Because I have very little to no understanding of elisp. :)
@tibbe I see :-)
in any case, setting tab-width
to 4 for Haskell source files is very bad, as the Haskell report hardcodes the tab width to 8 characters; see Haskell 2010, section 10.3 which states
- Tab stops are 8 characters apart.
- A tab character causes the insertion of enough spaces to align the current position with the next tab stop.
and in Emacs tab-width
defines how an actual \t
in the text file is interpreted.
PS: The haskell-mode
initialization code sets the tab-width
expliclity to 8 for this reason.
@hvr this was a failed attempts to have the tab key generate 4 spaces.
I added this configuration in my local init.el. So closing this pull request for now.
Add same configuration for hi2 [1], [2] as haskell-indentation.
[1] https://github.com/errge/hi2 [2] http://www.haskell.org/pipermail/haskell-cafe/2013-August/108290.html