Skip to content

Prevent unused variable warning in haskell-indentation #831

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 1 commit into from
Aug 24, 2015
Merged
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
preventing the unused variable warning.
The warning report system of the byte-compiler is not perfect.
It generates the warning if the third argument of dotimes is used.
Also, it does so if the first argument is not explicitly used in its body.
As workaround, this patch removes the third argument and put "_" to
the first argument.
  • Loading branch information
kazu-yamamoto committed Aug 24, 2015
commit c11ddd5e58d75ba3854cc1070f82eb3a6f9d8cfa
5 changes: 3 additions & 2 deletions haskell-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,10 @@ indentation points to the right, we switch going to the left."
"Makes sure that haskell-indentation-dyn-overlays contains at least N overlays."
(let* ((clen (length haskell-indentation-dyn-overlays))
(needed (- n clen)))
(dotimes (n needed haskell-indentation-dyn-overlays)
(dotimes (_n needed)
(setq haskell-indentation-dyn-overlays
(cons (make-overlay 1 1) haskell-indentation-dyn-overlays)))))
(cons (make-overlay 1 1) haskell-indentation-dyn-overlays)))
haskell-indentation-dyn-overlays))

(defun haskell-indentation-unshow-overlays ()
"Unshows all the overlays."
Expand Down