phobos.el: add support for viewing dub package home pages
This commit is contained in:
parent
134d726321
commit
491559212b
1 changed files with 11 additions and 0 deletions
11
phobos.el
11
phobos.el
|
@ -29,6 +29,8 @@
|
||||||
"Root URL to use when viewing documentation with `phobos'.")
|
"Root URL to use when viewing documentation with `phobos'.")
|
||||||
(defvar phobos-dpldocs-domain "dpldocs.info"
|
(defvar phobos-dpldocs-domain "dpldocs.info"
|
||||||
"Root domain to use when viewing documentation on dub packages with `dub-doc'.")
|
"Root domain to use when viewing documentation on dub packages with `dub-doc'.")
|
||||||
|
(defvar phobos-registry-root "https://code.dlang.org"
|
||||||
|
"Root URL of the D package registry used with `describe-dub-package'.")
|
||||||
|
|
||||||
(defun phobos (symbol)
|
(defun phobos (symbol)
|
||||||
"View the documentation on SYMBOL from the Phobos documentation.
|
"View the documentation on SYMBOL from the Phobos documentation.
|
||||||
|
@ -60,4 +62,13 @@ site hosted at <https://dpldocs.info>."
|
||||||
|
|
||||||
(defalias 'view-dub-documentation 'dub-doc)
|
(defalias 'view-dub-documentation 'dub-doc)
|
||||||
|
|
||||||
|
(defun describe-dub-package (package)
|
||||||
|
"View the home page for dub package PACKAGE.
|
||||||
|
|
||||||
|
PACKAGE is the name of a package listed on the code.dlang.org registry.
|
||||||
|
Also see `dub-doc' for retrieving documentation for a specific symbol."
|
||||||
|
(interactive "MPackage name: ")
|
||||||
|
(shell-command (format "%s %s/packages/%s"
|
||||||
|
phobos-browser phobos-registry-root package)))
|
||||||
|
|
||||||
(provide 'phobos)
|
(provide 'phobos)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue