summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2020-04-21 00:09:45 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2020-04-21 00:09:45 +0300
commitb37569964a5e387a8e511867c6cd518c0604791d (patch)
tree5844c1d609ceecf9b1124340719308597292e7eb
parent4fde201fb032e2840733ef146bdfeb23dc5b926b (diff)
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.
-rw-r--r--mu4e/mu4e-view.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el
index b2373ef..47871a1 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 "<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