Skip to content

Commit

Permalink
Merge pull request #283 from ryantm/byte-compile-warnings
Browse files Browse the repository at this point in the history
Reduce byte compilation warnings
  • Loading branch information
chrisdone committed Jun 12, 2014
2 parents ae0e87c + 95dbb75 commit 905faf5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
18 changes: 10 additions & 8 deletions tests/haskell-sort-imports-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
(ert-deftest single-line ()
(should (with-temp-buffer
(insert "import A\n")
(goto-line 1)
(goto-char (point-min))
(haskell-sort-imports)
(string= (buffer-string)
"import A\n"))))
Expand All @@ -38,7 +38,7 @@
(insert "import A
import B
")
(goto-line 1)
(goto-char (point-min))
(haskell-sort-imports)
(string= (buffer-string)
"import A
Expand All @@ -48,7 +48,7 @@ import B
(insert "import qualified A
import B
")
(goto-line 1)
(goto-char (point-min))
(haskell-sort-imports)
(string= (buffer-string)
"import qualified A
Expand All @@ -58,7 +58,7 @@ import B
(insert "import qualified \"mtl\" A
import B
")
(goto-line 1)
(goto-char (point-min))
(haskell-sort-imports)
(string= (buffer-string)
"import qualified \"mtl\" A
Expand All @@ -70,7 +70,7 @@ import B
(insert "import B
import A
")
(goto-line 1)
(goto-char (point-min))
(haskell-sort-imports)
(string= (buffer-string)
"import A
Expand All @@ -83,7 +83,8 @@ import B
import B
import A
")
(goto-line 2)
(goto-char (point-min))
(forward-line)
(haskell-sort-imports)
(string= (buffer-string)
"module A where
Expand All @@ -96,7 +97,8 @@ import B
import B
import A
")
(goto-line 3)
(goto-char (point-min))
(forward-line 2)
(haskell-sort-imports)
(string= (buffer-string)
"module C where
Expand All @@ -115,7 +117,7 @@ import Data.Aeson.Parser.Internal (decodeWith, decodeStrictWith,
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
")
(goto-line 1)
(goto-char (point-min))
(haskell-sort-imports)
(string= (buffer-string)
"import Data.Aeson.Encode (encode)
Expand Down
8 changes: 6 additions & 2 deletions w3m-haddock.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
;; Boston, MA 02110-1301, USA.

(require 'cl)
(require 'w3m)
(declare-function w3m-buffer-title "w3m")
(declare-function w3m-browse-url "w3m")
(defvar w3m-current-url)


(add-hook 'w3m-display-hook 'w3m-haddock-display)

Expand Down Expand Up @@ -143,7 +146,8 @@ You can rebind this if you're using hsenv by adding it to your
(insert
(haskell-fontify-as-mode text
'haskell-mode))))
(goto-line n))))
(goto-char (point-min))
(forward-line (1- n)))))

(defun w3m-haddock-format-heading ()
"Format a haddock entry."
Expand Down

0 comments on commit 905faf5

Please sign in to comment.