mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 15:56:35 -04:00
Fix void-function on push-button in goto-address-mode
* lisp/net/goto-addr.el (goto-address--button-action): New function (bug#81419). (goto-address-fontify): Use it as the button action. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
429336b409
commit
58e4dc3c53
|
|
@ -191,6 +191,7 @@ and `goto-address-fontify-p'."
|
|||
(overlay-put this-overlay
|
||||
'keymap goto-address-highlight-keymap)
|
||||
(overlay-put this-overlay 'button this-overlay)
|
||||
(overlay-put this-overlay 'action #'goto-address--button-action)
|
||||
(overlay-put this-overlay 'category 'goto-address)
|
||||
(overlay-put this-overlay 'goto-address t))))
|
||||
(goto-char (or start (point-min)))
|
||||
|
|
@ -250,6 +251,12 @@ using `browse-url-secondary-browser-function' instead."
|
|||
(browse-url-button-open-url url)
|
||||
(error "No e-mail address or URL found"))))))
|
||||
|
||||
(defun goto-address--button-action (button)
|
||||
"Open the URL represented by BUTTON."
|
||||
(save-excursion
|
||||
(goto-char (overlay-start button))
|
||||
(goto-address-at-point)))
|
||||
|
||||
(defun goto-address-find-address-at-point ()
|
||||
"Find e-mail address around or before point.
|
||||
Then search backwards to beginning of line for the start of an e-mail
|
||||
|
|
|
|||
Loading…
Reference in a new issue