1 Return-Path: <too@guru-group.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 7AAB3431FD4
\r
6 for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 13:22:10 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id nHom1Y2skqxT for <notmuch@notmuchmail.org>;
\r
16 Mon, 26 Aug 2013 13:22:05 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 98213431FAF
\r
19 for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 13:22:05 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 6A0E51000F4; Mon, 26 Aug 2013 23:21:59 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 1/1] emacs: removed 3 duplicate functions from notmuch-show.el
\r
25 Date: Mon, 26 Aug 2013 23:21:57 +0300
\r
26 Message-Id: <1377548517-17130-1-git-send-email-tomi.ollila@iki.fi>
\r
27 X-Mailer: git-send-email 1.8.0
\r
28 Cc: tomi.ollila@iki.fi
\r
29 X-BeenThere: notmuch@notmuchmail.org
\r
30 X-Mailman-Version: 2.1.13
\r
32 List-Id: "Use and development of the notmuch mail system."
\r
33 <notmuch.notmuchmail.org>
\r
34 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
35 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
36 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
37 List-Post: <mailto:notmuch@notmuchmail.org>
\r
38 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
39 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
41 X-List-Received-Date: Mon, 26 Aug 2013 20:22:10 -0000
\r
43 notmuch-show.el and notmuch.el had 3 duplicate, identical functions:
\r
44 notmuch-foreach-mime-part, notmuch-count-attachments and
\r
45 notmuch-save-attachments. Now these functions in notmuch-show.el
\r
46 are replaced with declare-functions pointing to "notmuch"(.el).
\r
48 emacs/notmuch-show.el | 39 +++------------------------------------
\r
49 1 file changed, 3 insertions(+), 36 deletions(-)
\r
51 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
52 index 82b70ba..2896aae 100644
\r
53 --- a/emacs/notmuch-show.el
\r
54 +++ b/emacs/notmuch-show.el
\r
56 (declare-function notmuch-search-next-thread "notmuch" nil)
\r
57 (declare-function notmuch-search-previous-thread "notmuch" nil)
\r
58 (declare-function notmuch-search-show-thread "notmuch" nil)
\r
59 +(declare-function notmuch-foreach-mime-part "notmuch" (function mm-handle))
\r
60 +(declare-function notmuch-count-attachments "notmuch" (mm-handle))
\r
61 +(declare-function notmuch-save-attachments "notmuch" (mm-handle &optional queryp))
\r
63 (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")
\r
64 "Headers that should be shown in a message, in this order.
\r
65 @@ -237,42 +240,6 @@ For example, if you wanted to remove an \"unread\" tag and add a
\r
67 (mm-display-parts (mm-dissect-buffer)))))
\r
69 -(defun notmuch-foreach-mime-part (function mm-handle)
\r
70 - (cond ((stringp (car mm-handle))
\r
71 - (dolist (part (cdr mm-handle))
\r
72 - (notmuch-foreach-mime-part function part)))
\r
73 - ((bufferp (car mm-handle))
\r
74 - (funcall function mm-handle))
\r
75 - (t (dolist (part mm-handle)
\r
76 - (notmuch-foreach-mime-part function part)))))
\r
78 -(defun notmuch-count-attachments (mm-handle)
\r
80 - (notmuch-foreach-mime-part
\r
82 - (let ((disposition (mm-handle-disposition p)))
\r
83 - (and (listp disposition)
\r
84 - (or (equal (car disposition) "attachment")
\r
85 - (and (equal (car disposition) "inline")
\r
86 - (assq 'filename disposition)))
\r
91 -(defun notmuch-save-attachments (mm-handle &optional queryp)
\r
92 - (notmuch-foreach-mime-part
\r
94 - (let ((disposition (mm-handle-disposition p)))
\r
95 - (and (listp disposition)
\r
96 - (or (equal (car disposition) "attachment")
\r
97 - (and (equal (car disposition) "inline")
\r
98 - (assq 'filename disposition)))
\r
101 - (concat "Save '" (cdr (assq 'filename disposition)) "' ")))
\r
102 - (mm-save-part p))))
\r
105 (defun notmuch-show-save-attachments ()
\r
106 "Save all attachments from the current message."
\r