all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: doc improvements for bug-reference.el
Date: Sat, 26 Jun 2021 16:04:09 -0700	[thread overview]
Message-ID: <86sg14xm6u.fsf@stephe-leake.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

I just customized bug-reference-mode for emacs debbugs. I had to read
the code to figure out what to set, so I have some suggestions for
improving the documentation; see attached patch.

Ok to commit?
-- 
-- Stephe

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bug-ref.diff --]
[-- Type: text/x-patch, Size: 1297 bytes --]

diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index f1ec5224c7..cec77119de 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -25,10 +25,12 @@
 
 ;; This file provides minor modes for putting clickable overlays on
 ;; references to bugs.  A bug reference is text like "PR foo/29292";
-;; this is mapped to a URL using a user-supplied format.
+;; this is mapped to a URL using a user-supplied format; see
+;; `bug-reference-url-format' and `bug-reference-bug-regexp'.
 
 ;; Two minor modes are provided.  One works on any text in the buffer;
-;; the other operates only on comments and strings.
+;; the other operates only on comments and strings. By default, the
+;; URL link is followed by invoking C-c RET or mouse-2.
 
 ;;; Code:
 
@@ -126,6 +128,9 @@ bug-reference-push-button
   "Open URL corresponding to the bug reference at POS."
   (interactive
    (list (if (integerp last-command-event) (point) last-command-event)))
+  (when (null bug-reference-url-format)
+    (user-error
+     "You must customize `bug-reference-url-format', then restart bug-reference-mode."))
   (if (and (not (integerp pos)) (eventp pos))
       ;; POS is a mouse event; switch to the proper window/buffer
       (let ((posn (event-start pos)))

             reply	other threads:[~2021-06-26 23:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26 23:04 Stephen Leake [this message]
2021-06-27  6:12 ` doc improvements for bug-reference.el Eli Zaretskii
2021-06-27 15:39   ` Stephen Leake
2021-06-27 15:54     ` Stephen Leake
2021-06-27 17:44       ` Eli Zaretskii
2021-06-28  5:24       ` Tassilo Horn
2021-06-27 17:43     ` Eli Zaretskii
2021-06-28  5:21     ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86sg14xm6u.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.