summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2022-07-17 13:55:19 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2022-07-17 13:57:28 +0300
commitad7f5cac92004407a6841e36cdeb614c2c52072f (patch)
treed89655f038f052db18d835faa28d3ad7c6409ac1
parentf77f8f743ef794ca916c4f4b908fd3dfe22f6127 (diff)
mu4e-message: avoid mu4e-message-at-point misfiring
Belt-and-suspenders fix for already-fixes issue #2299.
-rw-r--r--mu4e/mu4e-message.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/mu4e/mu4e-message.el b/mu4e/mu4e-message.el
index 6949768..ccf6eb3 100644
--- a/mu4e/mu4e-message.el
+++ b/mu4e/mu4e-message.el
@@ -114,10 +114,10 @@ or body-html."
Either the headers buffer or the view buffer, or nil if there is
no such message. If optional NOERROR is non-nil, do not raise an
error when there is no message at point."
- (let ((msg (or (get-text-property (point) 'msg) mu4e~view-message)))
- (if msg
- msg
- (unless noerror (mu4e-warn "No message at point")))))
+ (or (cond
+ ((eq major-mode 'mu4e-headers-mode) (get-text-property (point) 'msg))
+ ((eq major-mode 'mu4e-view-mode) mu4e~view-message))
+ (unless noerror (mu4e-warn "No message at point"))))
(defsubst mu4e-message-field-at-point (field)
"Get the field FIELD from the message at point.