From 18dcc19728f44683458222282945f3c6b83fd908 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 5 Dec 2010 00:40:06 +0100 Subject: [PATCH] (gnus-html-put-image): Use widget instead of local maps so that TAB works. --- lisp/ChangeLog | 3 +++ lisp/gnus-html.el | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c33ecbc82..2c069c6a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-12-04 Lars Magne Ingebrigtsen + * gnus-html.el (gnus-html-put-image): Use widget instead of local maps + so that TAB works. + * gnus-sum.el (gnus-summary-show-article): Reverse the meanings of `C-u C-u g' and `C-u g' so that `C-u g' does what it traditionally did. diff --git a/lisp/gnus-html.el b/lisp/gnus-html.el index 174e128a7..63a14b204 100644 --- a/lisp/gnus-html.el +++ b/lisp/gnus-html.el @@ -199,8 +199,11 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")." (gnus-html-display-image url start end ,alt-text)) 'gnus-image (list url start end alt-text))) - (gnus-overlay-put (gnus-make-overlay start end) - 'local-map gnus-html-image-map) + (widget-convert-button + 'url-link start (point) + :help-echo alt-text + :keymap gnus-html-image-map + url) (if (string-match "\\`cid:" url) ;; URLs with cid: have their content stashed in other ;; parts of the MIME structure, so just insert them @@ -473,10 +476,11 @@ Return a string with image data." (let ((image (gnus-rescale-image image (gnus-html-maximum-image-size)))) (delete-region start end) (gnus-put-image image alt-text 'external) - (gnus-put-text-property start (point) 'help-echo alt-text) - (gnus-overlay-put - (gnus-make-overlay start (point)) 'local-map - gnus-html-displayed-image-map) + (widget-convert-button + 'url-link start (point) + :help-echo alt-text + :keymap gnus-html-displayed-image-map + url) (gnus-put-text-property start (point) 'gnus-alt-text alt-text) (when url -- 2.34.1