--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 7AAB3431FD4\r
+ for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 13:22:10 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id nHom1Y2skqxT for <notmuch@notmuchmail.org>;\r
+ Mon, 26 Aug 2013 13:22:05 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 98213431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 13:22:05 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 6A0E51000F4; Mon, 26 Aug 2013 23:21:59 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/1] emacs: removed 3 duplicate functions from notmuch-show.el\r
+Date: Mon, 26 Aug 2013 23:21:57 +0300\r
+Message-Id: <1377548517-17130-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 26 Aug 2013 20:22:10 -0000\r
+\r
+notmuch-show.el and notmuch.el had 3 duplicate, identical functions:\r
+notmuch-foreach-mime-part, notmuch-count-attachments and\r
+notmuch-save-attachments. Now these functions in notmuch-show.el\r
+are replaced with declare-functions pointing to "notmuch"(.el).\r
+---\r
+ emacs/notmuch-show.el | 39 +++------------------------------------\r
+ 1 file changed, 3 insertions(+), 36 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 82b70ba..2896aae 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -41,6 +41,9 @@\r
+ (declare-function notmuch-search-next-thread "notmuch" nil)\r
+ (declare-function notmuch-search-previous-thread "notmuch" nil)\r
+ (declare-function notmuch-search-show-thread "notmuch" nil)\r
++(declare-function notmuch-foreach-mime-part "notmuch" (function mm-handle))\r
++(declare-function notmuch-count-attachments "notmuch" (mm-handle))\r
++(declare-function notmuch-save-attachments "notmuch" (mm-handle &optional queryp))\r
+ \r
+ (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
+ "Headers that should be shown in a message, in this order.\r
+@@ -237,42 +240,6 @@ For example, if you wanted to remove an \"unread\" tag and add a\r
+ )))\r
+ (mm-display-parts (mm-dissect-buffer)))))\r
+ \r
+-(defun notmuch-foreach-mime-part (function mm-handle)\r
+- (cond ((stringp (car mm-handle))\r
+- (dolist (part (cdr mm-handle))\r
+- (notmuch-foreach-mime-part function part)))\r
+- ((bufferp (car mm-handle))\r
+- (funcall function mm-handle))\r
+- (t (dolist (part mm-handle)\r
+- (notmuch-foreach-mime-part function part)))))\r
+-\r
+-(defun notmuch-count-attachments (mm-handle)\r
+- (let ((count 0))\r
+- (notmuch-foreach-mime-part\r
+- (lambda (p)\r
+- (let ((disposition (mm-handle-disposition p)))\r
+- (and (listp disposition)\r
+- (or (equal (car disposition) "attachment")\r
+- (and (equal (car disposition) "inline")\r
+- (assq 'filename disposition)))\r
+- (incf count))))\r
+- mm-handle)\r
+- count))\r
+-\r
+-(defun notmuch-save-attachments (mm-handle &optional queryp)\r
+- (notmuch-foreach-mime-part\r
+- (lambda (p)\r
+- (let ((disposition (mm-handle-disposition p)))\r
+- (and (listp disposition)\r
+- (or (equal (car disposition) "attachment")\r
+- (and (equal (car disposition) "inline")\r
+- (assq 'filename disposition)))\r
+- (or (not queryp)\r
+- (y-or-n-p\r
+- (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
+- (mm-save-part p))))\r
+- mm-handle))\r
+-\r
+ (defun notmuch-show-save-attachments ()\r
+ "Save all attachments from the current message."\r
+ (interactive)\r
+-- \r
+1.8.0\r
+\r