[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 528a383e5d 1/2: URL target finder: check for shr
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 528a383e5d 1/2: URL target finder: check for shr before using thingatpt |
Date: |
Sat, 29 Jan 2022 09:57:29 -0500 (EST) |
branch: externals/embark
commit 528a383e5df4abe2cb52b903597290bbb7f0069f
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
URL target finder: check for shr before using thingatpt
Thingatpt was find the shr URLs correctly, but reporting incorrect
bounds for them. So this change is just cosmetic, in a sense.
---
embark.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/embark.el b/embark.el
index 2412fb3109..4179414c49 100644
--- a/embark.el
+++ b/embark.el
@@ -779,15 +779,15 @@ different priorities in `embark-target-finders'."
(defun embark-target-url-at-point ()
"Target the URL at point."
- (if-let ((url (thing-at-point 'url)))
- `(url ,url . ,(thing-at-point-bounds-of-url-at-point t))
- (when-let ((url (or (get-text-property (point) 'shr-url)
- (get-text-property (point) 'image-url))))
+ (if-let ((url (or (get-text-property (point) 'shr-url)
+ (get-text-property (point) 'image-url))))
`(url ,url
,(previous-single-property-change
(min (1+ (point)) (point-max)) 'mouse-face nil (point-min))
. ,(next-single-property-change
- (point) 'mouse-face nil (point-max))))))
+ (point) 'mouse-face nil (point-max)))
+ (when-let ((url (thing-at-point 'url)))
+ `(url ,url . ,(thing-at-point-bounds-of-url-at-point t)))))
(declare-function widget-at "wid-edit")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/embark 528a383e5d 1/2: URL target finder: check for shr before using thingatpt,
ELPA Syncer <=