From b37569964a5e387a8e511867c6cd518c0604791d Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 21 Apr 2020 00:09:45 +0300 Subject: [PATCH] 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. --- mu4e/mu4e-view.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index b2373efc..47871a15 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -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 "") 'beginning-of-buffer) (define-key map (kbd "") '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 "") 'mu4e-scroll-down) ;; navigation between messages