phobos.el: declare a customization group

This commit is contained in:
Jeremy Baxter 2024-07-17 19:25:55 +12:00
parent 05f482e7dc
commit a50c278fa3

View file

@ -23,14 +23,27 @@
;;; Code:
(defvar phobos-browser "xdg-open"
"Web browser to use when opening documentation with `phobos'.")
(defvar phobos-root "https://dlang.org/library"
"Root URL to use when viewing documentation with `phobos'.")
(defvar phobos-dpldocs-domain "dpldocs.info"
"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'.")
(defgroup phobos nil
"View D documentation from within Emacs."
:prefix "phobos-"
:group 'languages)
(defcustom phobos-browser "xdg-open"
"Web browser to use when opening documentation with `phobos'."
:group 'phobos
:type 'string)
(defcustom phobos-root "https://dlang.org/library"
"Root URL to use when viewing documentation with `phobos'."
:group 'phobos
:type 'string)
(defcustom phobos-dpldocs-domain "dpldocs.info"
"Root domain to use when viewing documentation on dub packages with `dub-doc'."
:group 'phobos
:type 'string)
(defcustom phobos-registry-root "https://code.dlang.org"
"Root URL of the D package registry used with `describe-dub-package'."
:group 'phobos
:type 'string)
(defun phobos--visit (&rest format-args)
(let ((url (apply #'format format-args)))