summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-01-20 00:23:22 +0000
committerjao <jao@gnu.org>2021-01-20 00:23:22 +0000
commitec4f6c598cdd8c0dadd9abd7f22bc057a2216628 (patch)
tree7f6685d72c3e98c0963ca011dd9d25d9a048c823
parent95b7edebb2b037f1f6e9eb85a6b3bd917d669dcf (diff)
downloadelibs-ec4f6c598cdd8c0dadd9abd7f22bc057a2216628.tar.gz
elibs-ec4f6c598cdd8c0dadd9abd7f22bc057a2216628.tar.bz2
w3m embark actions: w3m-current-url
-rw-r--r--eos/jao-embark.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/eos/jao-embark.el b/eos/jao-embark.el
index 2450fdf..a59e241 100644
--- a/eos/jao-embark.el
+++ b/eos/jao-embark.el
@@ -39,7 +39,9 @@
"A regular expression matching URLs that point to video streams")
(defun jao-embark-w3m-anchor ()
- (when-let ((url (w3m-anchor))) (cons 'url url)))
+ (when (not (region-active-p))
+ (when-let ((url (or (w3m-anchor) w3m-current-url)))
+ (cons 'url url))))
(defun jao-refine-url (url)
(if (string-match-p jao-embark-video-url-rx url)