From 60826d7ccb9ef97f62a9ced29fc3d022d641c6f8 Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 31 Mar 2012 14:22:06 +0300 Subject: [PATCH] * mu4e-send.el: automatically include message signature if it's set --- emacs/mu4e-send.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/emacs/mu4e-send.el b/emacs/mu4e-send.el index 2de0ee5d..1f5bd99a 100644 --- a/emacs/mu4e-send.el +++ b/emacs/mu4e-send.el @@ -1,6 +1,6 @@ ;; mu4e-send.el -- part of mm, the mu mail user agent ;; -;; Copyright (C) 2011 Dirk-Jan C. Binnema +;; Copyright (C) 2011-2012 Dirk-Jan C. Binnema ;; Author: Dirk-Jan C. Binnema ;; Maintainer: Dirk-Jan C. Binnema @@ -296,7 +296,6 @@ use the new docid. Returns the full path to the new message." (use-local-map mu4e-edit-mode-map) (message-hide-headers) - (make-local-variable 'after-save-hook) ;; update the db when the file is saved...] @@ -370,6 +369,12 @@ using Gnus' `message-mode'." (mml-attach-file (plist-get att :file-name) (plist-get att :mime-type)))) + ;; include the message header if it's set; but not when editing an existing + ;; message + (unless (eq compose-type 'edit) + (when message-signature + (message-insert-signature))) + (if (member compose-type '(new forward)) (message-goto-to) (message-goto-body)))) @@ -445,7 +450,7 @@ buffer. (let ((refs)) (while (re-search-forward "<[^ <]+@[^ <]+>" nil t) (push (match-string 0) refs)) - ;; the last will the first + ;; the last will be the first (setq forwarded-from (first refs)))))) ;; remove the <> (when (and in-reply-to (string-match "<\\(.*\\)>" in-reply-to))