all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* doc improvements for bug-reference.el
@ 2021-06-26 23:04 Stephen Leake
  2021-06-27  6:12 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Leake @ 2021-06-26 23:04 UTC (permalink / raw)
  To: emacs-devel

[-- 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)))

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-28  5:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-26 23:04 doc improvements for bug-reference.el Stephen Leake
2021-06-27  6:12 ` 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

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.