Files
emacs/lisp/progmodes
Jim Porter ae9045a8bd Allow defining custom providers for more "thingatpt" functions
This also fixes an issue in EWW and bug-reference-mode where
(thing-at-point 'url) at the end of a URL would return nil.

See <https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00200.html>.

* lisp/thingatpt.el (forward-thing-provider-alist)
(bounds-of-thing-at-point-provider-alist): New variables...
(forward-thing, bounds-of-thing-at-point): ... use them.
(text-property-search-forward, text-property-search-backward)
(prop-match-beginning, prop-match-end): Declare.
(thing-at-point-for-text-property, forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): New functions.

* lisp/net/eww.el (eww--url-at-point): Use
'thing-at-point-for-text-property'.
(eww--bounds-of-url-at-point, eww--forward-url): New functions...
(eww-mode): ... use them.

* lisp/progmodes/bug-reference.el (bug-reference--url-at-point): Use
'thing-at-point-for-text-property'.
(bug-reference--bounds-of-url-at-point, bug-reference--forward-url): New
functions...
(bug-reference--init): ... use them.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): New
tests.

* etc/NEWS: Announce this change.
2024-05-19 18:31:58 -07:00
..
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-05-08 21:25:40 -07:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-21 15:28:06 +01:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-04-27 06:23:46 -04:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-05-03 09:16:39 +03:00
2024-01-02 10:28:14 +08:00
2024-03-02 03:43:14 -05:00
2024-01-02 10:28:14 +08:00
2024-04-26 12:25:28 +02:00
2024-02-13 20:35:05 -05:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-04-09 22:40:43 +03:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-02-27 08:24:45 -05:00
2024-01-02 09:47:10 +08:00