; Tweak "(emacs)Bug Reference" formatting/wording.

This commit is contained in:
Basil L. Contovounesios 2024-04-13 10:36:50 +02:00
parent ea62a14ea3
commit f0300fb059

View file

@ -3333,29 +3333,30 @@ merge requests resulting in different URLs.
@vindex bug-reference-auto-setup-functions @vindex bug-reference-auto-setup-functions
If @code{bug-reference-mode} is activated, If @code{bug-reference-mode} is activated,
@code{bug-reference-mode-hook} has been run and still @code{bug-reference-mode-hook} has been run, and either
@code{bug-reference-bug-regexp}, and @code{bug-reference-url-format} @code{bug-reference-bug-regexp} or @code{bug-reference-url-format} is
aren't both set, it'll try to setup suitable values for these two still @code{nil}, the mode will try to automatically find a suitable
variables itself by calling the functions in value for these two variables by calling the functions in
@code{bug-reference-auto-setup-functions} one after the other until @code{bug-reference-auto-setup-functions} one by one until one
one is able to set the variables. succeeds.
@vindex bug-reference-setup-from-vc-alist @vindex bug-reference-setup-from-vc-alist
@vindex bug-reference-forge-alist @vindex bug-reference-forge-alist
@vindex bug-reference-setup-from-mail-alist @vindex bug-reference-setup-from-mail-alist
@vindex bug-reference-setup-from-irc-alist @vindex bug-reference-setup-from-irc-alist
Right now, there are three types of setup functions. Right now, there are three types of setup functions.
@enumerate @enumerate
@item @item
Setup for version-controlled files configurable by the variables Setup for version-controlled files configurable by the variables
@code{bug-reference-forge-alist}, and @code{bug-reference-forge-alist}, and
@code{bug-reference-setup-from-vc-alist}. The defaults are able to @code{bug-reference-setup-from-vc-alist}. The defaults are able to
setup GNU projects where @url{https://debbugs.gnu.org} is used as set up GNU projects where @url{https://debbugs.gnu.org} is used as
issue tracker and issues are usually referenced as @code{bug#13} (but issue tracker and issues are usually referenced as @code{bug#13} (but
many different notations are considered, too), and several kinds of many different notations are considered, too), as well as several
modern software forges such as GitLab, Gitea, SourceHut, or GitHub. other kinds of software forges such as GitLab, Gitea, SourceHut, and
If you deploy a self-hosted instance of such a forge, the easiest way GitHub. If you deploy a self-hosted instance of such a forge, the
to tell bug-reference about it is through easiest way to tell bug-reference about it is through
@code{bug-reference-forge-alist}. @code{bug-reference-forge-alist}.
@item @item
@ -3372,7 +3373,7 @@ Rcirc, @xref{Top, Rcirc,, rcirc, The Rcirc Manual}, and ERC,
@end enumerate @end enumerate
For almost all of those modes, it's enough to simply enable For almost all of those modes, it's enough to simply enable
@code{bug-reference-mode}, only Rmail requires a slightly different @code{bug-reference-mode}; only Rmail requires a slightly different
setup. setup.
@smallexample @smallexample
@ -3403,33 +3404,35 @@ to be performed whenever another messages is displayed.
@heading Adding support for third-party packages @heading Adding support for third-party packages
@vindex bug-reference-auto-setup-functions @vindex bug-reference-auto-setup-functions
Adding support for bug-reference' auto-setup is usually quite Adding support for bug-reference auto-setup is usually quite
straight-forward: write a setup function of zero arguments which straightforward: write a setup function of zero arguments which
gathers the required information (e.g., List-Id/To/From/Cc mail header gathers the required information (e.g., List-Id/To/From/Cc mail header
values in the case of a MUA), and then calls one of the following values in the case of a MUA), and then calls one of the following
helper functions: helper functions:
@itemize @bullet @itemize @bullet
@item @item
@code{bug-reference-maybe-setup-from-vc} which does the setup @code{bug-reference-maybe-setup-from-vc}, which does the setup
according to @code{bug-reference-setup-from-vc-alist}, according to @code{bug-reference-setup-from-vc-alist};
@item @item
@code{bug-reference-maybe-setup-from-mail} which does the setup @code{bug-reference-maybe-setup-from-mail}, which does the setup
according to @code{bug-reference-setup-from-mail-alist}, according to @code{bug-reference-setup-from-mail-alist}; and
@item @item
and @code{bug-reference-maybe-setup-from-irc} which does the setup @code{bug-reference-maybe-setup-from-irc}, which does the setup
according to @code{bug-reference-setup-from-irc-alist}. according to @code{bug-reference-setup-from-irc-alist}.
@end itemize @end itemize
A setup function should return non-@code{nil} if it could setup bug-reference
mode which is the case if the last thing the function does is calling A setup function should return non-@code{nil} if it could set up
one of the helper functions above. bug-reference mode, which is the case if the last thing the function
does is call one of the helper functions above.
Finally, the setup function has to be added to Finally, the setup function has to be added to
@code{bug-reference-auto-setup-functions}. @code{bug-reference-auto-setup-functions}.
Note that these auto-setup functions should check as a first step if Note that these auto-setup functions should check as a first step if
they are applicable, e.g., by checking the @code{major-mode} value. they are applicable, e.g., by checking the value of @code{major-mode}.
@heading Integration with the debbugs package @heading Integration with the debbugs package