From c2e2a86d1bbbca9419ba2f9c89c6996f51b34d20 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 30 Nov 2025 20:40:12 +0200 Subject: [PATCH] Make goto-address/bug-reference buttons TAB-navigable in 'button-mode' * lisp/net/goto-addr.el (goto-address-fontify): Set overlay property 'button' to 'this-overlay', and 'category' to 'goto-address'. * lisp/progmodes/bug-reference.el (bug-reference-fontify): Set overlay property 'button' to 'ov' (bug#74792). --- lisp/net/goto-addr.el | 2 ++ lisp/progmodes/bug-reference.el | 1 + 2 files changed, 3 insertions(+) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index fa346a5d944..349d73eba0e 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -187,6 +187,8 @@ and `goto-address-fontify-p'." 'help-echo "mouse-2, C-c RET: follow URL") (overlay-put this-overlay 'keymap goto-address-highlight-keymap) + (overlay-put this-overlay 'button this-overlay) + (overlay-put this-overlay 'category 'goto-address) (overlay-put this-overlay 'goto-address t)))) (goto-char (or start (point-min))) (while (re-search-forward goto-address-mail-regexp end t) diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index b6ce135be3e..753718efa63 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -187,6 +187,7 @@ subexpression 10." (let ((ov (make-overlay (car bounds) (cdr bounds) nil t nil))) (overlay-put ov 'category 'bug-reference) + (overlay-put ov 'button ov) ov)))) ;; Don't put a link if format is undefined. (when bug-reference-url-format