diff options
author | jao <jao@gnu.org> | 2023-03-02 03:37:40 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2023-03-02 03:37:40 +0000 |
commit | 8d2f1703936045a5d4be09579cad9084e3ace54a (patch) | |
tree | de0b7dff388e600e0d6cc7ea48420e8b2e0ac85d /custom/jao-custom-gnus.el | |
parent | 4bed4ec9ec8cd1270731b1d7d5572345e46b28d1 (diff) | |
download | elibs-8d2f1703936045a5d4be09579cad9084e3ace54a.tar.gz elibs-8d2f1703936045a5d4be09579cad9084e3ace54a.tar.bz2 |
embark: replacements for embark-define-keymap definitions
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r-- | custom/jao-custom-gnus.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index e21286a..164257b 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -586,10 +586,12 @@ (gnus-summary-select-article-buffer) (save-excursion (goto-char (point-min)) - (when (search-forward "Enclosure:") - (forward-char 2) - (when-let ((url (thing-at-point-url-at-point))) - (jao-mpc-add-or-play-url url)))))) + (let ((offset (or (and (search-forward-regexp "^Enclosure: " nil t) 2) + (and (search-forward-regexp "^Enclosure$" nil t) -2)))) + (when offset (forward-char offset)) + (if-let ((url (jao-url-around-point))) + (jao-mpc-add-or-play-url url) + (error "No enclosure found")))))) ;;;; delayed messages (require 'gnus-util) |