From 1bd332fba11d28e45b3e32be0c89137592cc4caf Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 25 Jan 2014 02:48:32 +0200 Subject: [PATCH] * mu4e: small update in doc --- mu4e/mu4e.texi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index c95c9cd4..a661daf9 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -1460,13 +1460,14 @@ Let's look at some examples. First, suppose we want to set the (defun my-set-from-address () "Set the From address based on the To address of the original." (let ((msg mu4e-compose-parent-message)) ;; msg is shorter... - (setq user-mail-address - (cond - ((mu4e-message-contact-field-matches msg :to "me@@foo.com") - "me@@foo.com") - ((mu4e-message-contact-field-matches msg :to "me@@bar.com") - "me@@bar.com") - (t "me@@cuux.com")))))) + (when msg + (setq user-mail-address + (cond + ((mu4e-message-contact-field-matches msg :to "me@@foo.com") + "me@@foo.com") + ((mu4e-message-contact-field-matches msg :to "me@@bar.com") + "me@@bar.com") + (t "me@@cuux.com"))))))) @end lisp Second, as mentioned, @code{mu4e-compose-mode-hook} is especially useful for