projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ef9209
)
Ensure 'existing-filename' has 'bounds-of-thing-at-point'
author
Philip Kaludercic
<philipk@posteo.net>
Sun, 16 Jul 2023 11:56:23 +0000
(13:56 +0200)
committer
Philip Kaludercic
<philipk@posteo.net>
Sat, 22 Jul 2023 07:20:50 +0000
(09:20 +0200)
* lisp/thingatpt.el (existing-filename): Define
'bounds-of-thing-at-point' for 'existing-filename'. (Bug#64664)
lisp/thingatpt.el
patch
|
blob
|
history
diff --git
a/lisp/thingatpt.el
b/lisp/thingatpt.el
index 408713dda1a01ed9bdd717b967a99abfa635d8cd..72acb0b749f3572d16e76ccf581ce9a2baa661d7 100644
(file)
--- 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