Skip to content

Commit

Permalink
Fix w3m-haddock in the case of no local files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed Mar 20, 2015
1 parent 606ac68 commit 9cb56d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions w3m-haddock.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
(declare-function w3m-browse-url "w3m")
(defvar w3m-current-url)


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

(defface w3m-haddock-heading-face
Expand Down Expand Up @@ -68,11 +67,14 @@ You can rebind this if you're using hsenv by adding it to your
entries)))
(cond
((member package-dir entries)
(cl-loop for dir in haskell-w3m-haddock-dirs
when (w3m-haddock-find-index dir package-dir)
do (progn (w3m-browse-url (w3m-haddock-find-index dir package-dir)
t)
(cl-return))))
(unless (cl-loop for dir in haskell-w3m-haddock-dirs
when (w3m-haddock-find-index dir package-dir)
do (progn (w3m-browse-url (w3m-haddock-find-index dir package-dir)
t)
(cl-return t)))
(w3m-browse-url (concat "http://hackage.haskell.org/package/"
package-dir)
t)))
(t
(w3m-browse-url (concat "http://hackage.haskell.org/package/"
package-dir)
Expand Down

0 comments on commit 9cb56d7

Please sign in to comment.