mu4e: temporary reset browse-url-handlers in view in xwidget action

If `browse-url-handlers` is set `mu4e-action-view-in-xwidget` function
tries to open url in the handler first instead of xwidget. This is
happening because `browse-url` first checks `browse-url-handlers` and
`browse-url-browser-function` after.

Signed-off-by: Aleksei Atavin <axeoman@gmail.com>
This commit is contained in:
Aleksei Atavin 2022-10-28 22:33:47 +03:00 committed by Dirk-Jan C. Binnema
parent e2c62aa6d1
commit 523a458239
1 changed files with 4 additions and 3 deletions

View File

@ -697,9 +697,10 @@ determine which browser function to use."
"Show current MSG in an embedded xwidget, if available."
(unless (fboundp 'xwidget-webkit-browse-url)
(mu4e-error "No xwidget support available"))
(let ((browse-url-browser-function
(lambda (url &optional _rest)
(xwidget-webkit-browse-url url))))
(let ((browse-url-handlers nil)
(browse-url-browser-function
(lambda (url &optional _rest)
(xwidget-webkit-browse-url url))))
(mu4e-action-view-in-browser msg)))
(defun mu4e~view-render-buffer (msg)