]> git.eshelyaron.com Git - emacs.git/commitdiff
Make TAB and M-TAB run widget-forward and widget-backward (bug#25091)
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 5 Dec 2016 23:32:36 +0000 (23:32 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 5 Dec 2016 23:32:36 +0000 (23:32 +0000)
* lisp/gnus/mm-decode (mm-convert-shr-links): Avoid `shr-next-link'
and `shr-previous-link' so TAB and M-TAB run `widget-forward' and
`widget-backward' instead (bug#25091).

lisp/gnus/mm-decode.el

index 4b3f10c2e191ceeb760766f706e4eb25d160717f..3127a22e41d7d07d45682172826dbe6b79f2d350 100644 (file)
@@ -1859,6 +1859,10 @@ If RECURSIVE, search recursively."
        (dolist (key (where-is-internal #'widget-button-click widget-keymap))
          (unless (lookup-key keymap key)
            (define-key keymap key #'ignore)))
+       ;; Avoid `shr-next-link' and `shr-previous-link' in `keymap' so
+       ;; TAB and M-TAB run `widget-forward' and `widget-backward' instead.
+       (substitute-key-definition 'shr-next-link nil keymap)
+       (substitute-key-definition 'shr-previous-link nil keymap)
        (dolist (overlay (overlays-at start))
          (overlay-put overlay 'face nil))
        (setq start end)))))