Skip to content

Commit

Permalink
do not require w3m
Browse files Browse the repository at this point in the history
Instead of requiring w3m, which is not a package included with Emacs by
default, use declare-function and defvar. This removes byte compilation
warnings, without requiring w3m to be installed.
  • Loading branch information
ryantm committed Jun 12, 2014
1 parent 5ffbf1d commit 95dbb75
Showing 1 changed file with 6 additions and 2 deletions.
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 95dbb75

Please sign in to comment.