get the latest path.

This commit is contained in:
Kazu Yamamoto 2010-03-11 14:15:28 +09:00
parent 5e7c7aa87d
commit f1a0e079db

View File

@ -28,7 +28,9 @@
(defun ghc-resolve-document-path (pkg)
(with-temp-buffer
(call-process "ghc-pkg" nil t nil "field" pkg "haddock-html")
(goto-char (point-min))
(goto-char (point-max))
(forward-line -1)
(beginning-of-line)
(when (looking-at "^haddock-html: \\([^ \n]+\\)$")
(match-string-no-properties 1))))