mu4e-view: fix gnus-button click for emacs 26

There are some behavioral differences causing the RET binding in emacs
26.3 (an possibly others) to be active even in gnus mode; this breaks
clicking URLs.

Attempt to work around that.
This commit is contained in:
Dirk-Jan C. Binnema 2020-04-21 00:09:45 +03:00
parent 4fde201fb0
commit b37569964a
1 changed files with 7 additions and 1 deletions

View File

@ -839,7 +839,13 @@ FUNC should be a function taking two arguments:
(define-key map (kbd "SPC") 'mu4e-view-scroll-up-or-next)
(define-key map (kbd "<home>") 'beginning-of-buffer)
(define-key map (kbd "<end>") 'end-of-buffer)
(define-key map (kbd "RET") 'mu4e-scroll-up)
(define-key map (kbd "RET")
(lambda()
(interactive)
(if (and mu4e-view-use-gnus
(eq (get-text-property (point) 'gnus-callback) 'gnus-button-push))
(widget-button-press (point))
(mu4e-scroll-up))))
(define-key map (kbd "<backspace>") 'mu4e-scroll-down)
;; navigation between messages