phobos.el: improve documentation
This commit is contained in:
parent
7d64c06589
commit
decfe0dc9c
1 changed files with 8 additions and 5 deletions
13
phobos.el
13
phobos.el
|
@ -24,16 +24,19 @@
|
|||
;;; Code:
|
||||
|
||||
(defvar phobos-browser "xdg-open"
|
||||
"Web browser to use when opening Phobos documentation.")
|
||||
"Web browser to use when opening documentation with `phobos'.")
|
||||
(defvar phobos-root "https://dlang.org/library"
|
||||
"Root URL to use when viewing Phobos documentation.")
|
||||
"Root URL to use when viewing documentation with `phobos'.")
|
||||
|
||||
(defun phobos (symbol-name)
|
||||
"View the documentation on SYMBOL-NAME from the Phobos documentation.
|
||||
|
||||
SYMBOL-NAME can be a module (e.g. std.algorithm), a submodule (e.g.
|
||||
std.algorithm.searching), a function (e.g. std.algorithm.searching.findSplit)
|
||||
or any other symbol part of a standard module, such as object.Exception."
|
||||
SYMBOL-NAME can be a module (e.g. std.sumtype), a submodule (e.g.
|
||||
std.algorithm.searching), a function or type (e.g. std.stdio.File)
|
||||
or any other symbol part of a standard module, such as object.Exception.
|
||||
|
||||
Phobos is the standard library for the D programming language. For more
|
||||
information on Phobos and the D programming language, see <https://dlang.org>."
|
||||
(interactive "MModule or symbol: ")
|
||||
(shell-command (concat phobos-browser " " phobos-root "/"
|
||||
(string-replace "." "/" symbol-name) ".html")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue