;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\"\210\307\310\311\312\313\314%\210\315\316\317\320\321DD\322\313\314\323\324&\207" [require cl-lib haskell-mode haskell-font-lock add-hook w3m-display-hook w3m-haddock-display custom-declare-face w3m-haddock-heading-face ((((class color)) :inherit highlight)) "Face for quarantines." :group haskell custom-declare-variable haskell-w3m-haddock-dirs funcall function #[0 "\300\207" [("~/.cabal/share/doc/")] 1] "The path to your cabal documentation dir. It should contain\ndirectories of package-name-x.x.\n\nYou can rebind this if you're using hsenv by adding it to your\n.dir-locals.el in your project root. E.g.\n\n ((haskell-mode . ((haskell-w3m-haddock-dirs . (\"/home/chris/Projects/foobar/.hsenv/cabal/share/doc\")))))\n\n" :type list] 8) #@32 Regex to match entry headings. (defvar w3m-haddock-entry-regex "^\\(\\(data\\|type\\) \\|[a-z].* :: \\)" (#$ . 899)) #@29 Open a haddock page in w3m. (defalias 'haskell-w3m-open-haddock #[0 "\301\302\303\304\305\306\"\"\"\307\310\"\211\235\203M\3112B\312:\203>@\262\313\"\2037\314\313\"\315\"\210\316\311\315\"\210A\262\202\266\3120?\205S\314\317P\315\"\207\314\317P\315\"\207" [haskell-w3m-haddock-dirs cl-remove-if #[257 "\211\300\230\207" [""] 3 "\n\n(fn S)"] apply append mapcar #[257 "\300\301\302P!\303\"\207" [split-string shell-command-to-string "ls -1 " "\n"] 5 "\n\n(fn DIR)"] ido-completing-read "Package: " --cl-block-nil-- nil w3m-haddock-find-index w3m-browse-url t throw "http://hackage.haskell.org/package/"] 8 (#$ . 1022) nil]) #@20 (fn DIR PACKAGE) (defalias 'w3m-haddock-find-index #[514 "\300\301R\300\302R\303!\203\207\303!\205\211\207" ["/" "/html/index.html" "/index.html" file-exists-p] 7 (#$ . 1675)]) #@23 Haddock general page? (defalias 'w3m-haddock-page-p #[0 "\212db\210\300y\210\301\302!)\207" [-2 looking-at "[ ]*Produced by Haddock"] 2 (#$ . 1871)]) #@22 Haddock source page? (defalias 'w3m-haddock-source-p #[0 "\212eb\210\300\301!\206\300\302!\206\300\303!)\207" [looking-at "Location: https?://hackage.haskell.org/package/.*/docs/src/" "Location: file://.*cabal/share/doc/.*/html/src/" "Location: .*src/.*.html$"] 2 (#$ . 2027)]) #@19 Any haddock page? (defalias 'w3m-haddock-p #[0 "\300 \206\301 \207" [w3m-haddock-page-p w3m-haddock-source-p] 1 (#$ . 2315)]) #@72 Find a tag by jumping to the "All" index and doing a search-forward. (defalias 'w3m-haddock-find-tag #[0 "\301 \205\302 \211\205\303\304\305\306#!\210\307!\262\207" [w3m-current-url w3m-haddock-p haskell-ident-at-point w3m-browse-url replace-regexp-in-string "docs/.*" "docs/doc-index-All.html" search-forward] 6 (#$ . 2449) nil]) #@194 To be run by w3m's display hook. This takes a normal w3m buffer containing hadddock documentation and reformats it to be more usable and look like a dedicated documentation page. (fn URL) (defalias 'w3m-haddock-display #[257 "\302 \2031\212eb\210\303`\304 |\210\305 \210\306 !\203'\307 \203!\310 \210\305 \210\202*\311\312\313p!\314Q!\210\315 \205]\316\317!\210\320 \212eb\210\321y\210`d{\303`d|\210\322\323\"c\210)\210)eb\210\211Sy\262\207" [inhibit-read-only w3m-haddock-entry-regex w3m-haddock-page-p t line-end-position w3m-haddock-next-heading looking-at w3m-haddock-valid-heading w3m-haddock-format-heading rename-buffer "*haddock: " w3m-buffer-title "*" w3m-haddock-source-p font-lock-mode -1 line-number-at-pos 1 haskell-fontify-as-mode haskell-mode] 6 (#$ . 2796)]) #@25 Format a haddock entry. (defalias 'w3m-haddock-format-heading #[0 "\300\301 \212\302 )S\"\303\304\305#\266\212\306 \210\307 \205`)\211\205)\212\302 \210\310`\311#)\207" [make-overlay line-beginning-position w3m-haddock-header-end overlay-put face w3m-haddock-heading-face w3m-haddock-next-heading w3m-haddock-valid-heading indent-rigidly 4] 5 (#$ . 3592)]) #@47 Go to the next heading, or end of the buffer. (defalias 'w3m-haddock-next-heading #[0 "\301y\210\302\303\304\301$\204db\210\305 b\207" [w3m-haddock-entry-regex 1 search-forward-regexp nil t line-beginning-position] 5 (#$ . 3961)]) #@26 Is this a valid heading? (defalias 'w3m-haddock-valid-heading #[0 "\300`\301\"?\207" [get-text-property face] 3 (#$ . 4201)]) #@30 Go to the end of the header. (defalias 'w3m-haddock-header-end #[0 "\300\301!\207" [search-forward-regexp "\n[ \n]"] 2 (#$ . 4333)]) (provide 'w3m-haddock)