unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39781: [PATCH] gnus-button-alist: Prefer URL links to Elisp library links
@ 2020-02-25 13:01 Štěpán Němec
  2020-07-19 14:05 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Štěpán Němec @ 2020-02-25 13:01 UTC (permalink / raw)
  To: 39781

* lisp/gnus/gnus-art.el (gnus-button-alist): Move the URL clauses
higher up the list before library link setup to prevent URLs ending in
".el" from failing to be recognized (and invalid library links being
created instead).
---
 lisp/gnus/gnus-art.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 754655d679..f9d9ad2679 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7708,6 +7708,15 @@ gnus-button-alist
      0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1)
     ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
      0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1)
+    ;; This is how URLs _should_ be embedded in text (RFC 1738, RFC 2396)...
+    ("<URL: *\\([^\n<>]*\\)>"
+     1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1)
+    ;; RFC 2396 (2.4.3., delims) ...
+    ("\"URL: *\\([^\n\"]*\\)\""
+     1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1)
+    ;; Raw URLs.
+    (gnus-button-url-regexp
+     0 (>= gnus-button-browse-level 0) browse-url-button-open-url 0)
     ;; The following entries may lead to many false positives so don't enable
     ;; them by default (use a high button level).
     ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]"
@@ -7731,15 +7740,6 @@ gnus-button-alist
      ;; Unlike the other regexps we really have to require quoting
      ;; here to determine where it ends.
      1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
-    ;; This is how URLs _should_ be embedded in text (RFC 1738, RFC 2396)...
-    ("<URL: *\\([^\n<>]*\\)>"
-     1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1)
-    ;; RFC 2396 (2.4.3., delims) ...
-    ("\"URL: *\\([^\n\"]*\\)\""
-     1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1)
-    ;; Raw URLs.
-    (gnus-button-url-regexp
-     0 (>= gnus-button-browse-level 0) browse-url-button-open-url 0)
     ;; man pages
     ("\\b\\([a-z][a-z]+([1-9])\\)\\W"
      0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3))
-- 
2.25.1






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

* bug#39781: [PATCH] gnus-button-alist: Prefer URL links to Elisp library links
  2020-02-25 13:01 bug#39781: [PATCH] gnus-button-alist: Prefer URL links to Elisp library links Štěpán Němec
@ 2020-07-19 14:05 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-07-19 14:05 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: 39781

Štěpán Němec <stepnem@gmail.com> writes:

> * lisp/gnus/gnus-art.el (gnus-button-alist): Move the URL clauses
> higher up the list before library link setup to prevent URLs ending in
> ".el" from failing to be recognized (and invalid library links being
> created instead).

Makes sense to me, so I've now applied this to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-07-19 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 13:01 bug#39781: [PATCH] gnus-button-alist: Prefer URL links to Elisp library links Štěpán Němec
2020-07-19 14:05 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).