summaryrefslogtreecommitdiff
path: root/lisp/thingatpt.el
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2023-07-16 13:56:23 +0200
committerPhilip Kaludercic <philipk@posteo.net>2023-07-22 09:20:50 +0200
commitb6207ee4dcb17106262d278fd11408edd4a55316 (patch)
tree7832a34937d44aa1832af05baffe4f46324db493 /lisp/thingatpt.el
parent8ef92096c349206794e928f702b56f62bf88a122 (diff)
downloademacs-b6207ee4dcb17106262d278fd11408edd4a55316.tar.gz
Ensure 'existing-filename' has 'bounds-of-thing-at-point'
* lisp/thingatpt.el (existing-filename): Define 'bounds-of-thing-at-point' for 'existing-filename'. (Bug#64664)
Diffstat (limited to 'lisp/thingatpt.el')
-rw-r--r--lisp/thingatpt.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 408713dda1a..72acb0b749f 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -360,6 +360,10 @@ E.g.:
(and (file-exists-p filename)
filename)))
+(put 'existing-filename 'bounds-of-thing-at-point
+ (lambda ()
+ (and (thing-at-point 'existing-filename)
+ (bounds-of-thing-at-point 'filename))))
(put 'existing-filename 'thing-at-point 'thing-at-point-file-at-point)
;; Faces