diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-06-26 00:16:25 +0200 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-06-26 00:16:25 +0200 |
commit | fdcf46d33eebc59e56a35fcea186c61aad3c81d0 (patch) | |
tree | 8db131d7f52ead80ee12e52c3236510f71b31b48 /lisp/gnus/mm-decode.el | |
parent | d6930356cabd3036e445cc6a2f668b1fd3e0cde4 (diff) | |
parent | 0377fe2b819bb93ac7dc314c8dbd99304d8b98d0 (diff) | |
download | emacs-fdcf46d33eebc59e56a35fcea186c61aad3c81d0.tar.gz emacs-fdcf46d33eebc59e56a35fcea186c61aad3c81d0.tar.bz2 emacs-fdcf46d33eebc59e56a35fcea186c61aad3c81d0.zip |
Merge from origin/emacs-25
0377fe2 ; Spelling fixes
f253695 Update docs for `customize-mode'
4395aaa Fix documentation of 'assoc-string' and 'compare-strings'
ab0ebb9 ; Only load .elc file in tests.
a98aa02 Error on multibyte characters in HTTP request
ea512a7 * lisp/gnus/mm-decode.el (mm-convert-shr-links): Mask keys th...
8297331 ; Revert "Ensure undo-boundary after insert-file-contents."
dc5e65b Unset GIT_DIR when calling Git commands
6cdd8f7 Ensure undo-boundary after insert-file-contents.
4793f5f Clarify documentation of 'line-spacing' and 'line-height'
5f37572 Fix removal of variables from process-environment
e5e886d * admin/authors.el (authors-ignored-files, authors-valid-file...
db0777b * admin/authors.el (authors-aliases, authors-fixed-case): Add...
# Conflicts:
# doc/lispref/modes.texi
# lisp/gnus/mm-decode.el
Diffstat (limited to 'lisp/gnus/mm-decode.el')
-rw-r--r-- | lisp/gnus/mm-decode.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 744474ca113..c653d735543 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1840,10 +1840,11 @@ If RECURSIVE, search recursively." (defvar shr-image-map) (autoload 'widget-convert-button "wid-edit") +(defvar widget-keymap) (defun mm-convert-shr-links () (let ((start (point-min)) - end) + end keymap) (while (and start (< start (point-max))) (when (setq start (text-property-not-all start (point-max) 'shr-url nil)) @@ -1851,10 +1852,16 @@ If RECURSIVE, search recursively." (widget-convert-button 'url-link start end :help-echo (get-text-property start 'help-echo) - ;;; FIXME Should only use the image map on images. - :keymap shr-image-map + :keymap (setq keymap (copy-keymap shr-map)) (get-text-property start 'shr-url)) - (put-text-property start end 'local-map nil) + ;; Remove keymap that `shr-urlify' adds. + (put-text-property start end 'keymap nil) + ;; Mask keys that launch `widget-button-click'. + ;; Those bindings are provided by `widget-keymap' + ;; that is a parent of `gnus-article-mode-map'. + (dolist (key (where-is-internal #'widget-button-click widget-keymap)) + (unless (lookup-key keymap key) + (define-key keymap key #'ignore))) (dolist (overlay (overlays-at start)) (overlay-put overlay 'face nil)) (setq start end))))) |