[PATCH 2/2] emacs: slightly cleanup the reply code

Jani Nikula jani at nikula.org
Wed Aug 28 12:34:22 PDT 2013


Since the starting point for the original message can now be found
with the simple (message-goto-body), there's no need to save
point. Drop the extra let block. No functional changes.
---
 emacs/notmuch-mua.el |   35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index a4be394..c800250 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -193,24 +193,23 @@ list."
       ;; Move point to the beginning of the message body.
       (message-goto-body)
 
-      (let ((from (plist-get original-headers :From))
-	    (date (plist-get original-headers :Date))
-	    (start (point)))
-
-	;; message-cite-original constructs a citation line based on the From and Date
-	;; headers of the original message, which are assumed to be in the buffer.
-	(insert "From: " from "\n")
-	(insert "Date: " date "\n\n")
-
-	;; Get the parts of the original message that should be quoted; this includes
-	;; all the text parts, except the non-preferred ones in a multipart/alternative.
-	(let ((quotable-parts (notmuch-mua-get-quotable-parts (plist-get original :body))))
-	  (mapc (apply-partially 'notmuch-mua-insert-quotable-part original) quotable-parts))
-
-	(set-mark (point))
-	(goto-char start)
-	;; Quote the original message according to the user's configured style.
-	(message-cite-original))))
+      ;; message-cite-original constructs a citation line based on the
+      ;; From and Date headers of the original message, which are
+      ;; assumed to be in the buffer.
+      (insert "From: " (plist-get original-headers :From) "\n")
+      (insert "Date: " (plist-get original-headers :Date) "\n\n")
+
+      ;; Get the parts of the original message that should be quoted;
+      ;; this includes all the text parts, except the non-preferred
+      ;; ones in a multipart/alternative.
+      (let ((quotable-parts (notmuch-mua-get-quotable-parts (plist-get original :body))))
+	(mapc (apply-partially 'notmuch-mua-insert-quotable-part original) quotable-parts))))
+
+  ;; Quote the original message according to the user's configured
+  ;; style.
+  (set-mark (point))
+  (message-goto-body)
+  (message-cite-original)
 
   (goto-char (point-max))
   (push-mark)
-- 
1.7.10.4



More information about the notmuch mailing list