[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 4b / 6dfad80cd8c6018335a7dda4c18af649fbb3d9
1 Return-Path: <dme@dme.org>\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 699EE431E84\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 07:05:14 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 B0LiadQqhuZq for <notmuch@notmuchmail.org>;\r
16         Wed, 25 Jan 2012 07:05:13 -0800 (PST)\r
17 Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com\r
18  [74.125.82.41])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  A67D9431FBC    for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 07:05:13 -0800\r
21  (PST)\r
22 Received: by wgbdt11 with SMTP id dt11so1518003wgb.2\r
23         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 07:05:12 -0800 (PST)\r
24 MIME-Version: 1.0\r
25 Received: by 10.180.82.41 with SMTP id f9mr28938727wiy.7.1327503912303;\r
26         Wed, 25 Jan 2012 07:05:12 -0800 (PST)\r
27 Received: from hotblack-desiato.hh.sledj.net\r
28         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
29         by mx.google.com with ESMTPS id m8sm2259782wia.11.2012.01.25.07.05.10\r
30         (version=TLSv1/SSLv3 cipher=OTHER);\r
31         Wed, 25 Jan 2012 07:05:11 -0800 (PST)\r
32 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
33         id 767219FE67; Wed, 25 Jan 2012 15:05:09 +0000 (GMT)\r
34 From: David Edmondson <dme@dme.org>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH 1/1] emacs: Take more care when hiding regions with buttons.\r
37 Date: Wed, 25 Jan 2012 15:05:08 +0000\r
38 Message-Id: <1327503908-17226-1-git-send-email-dme@dme.org>\r
39 X-Mailer: git-send-email 1.7.8.3\r
40 X-Gm-Message-State:\r
41  ALoCoQkBuyRD44YHDQBnGE3Qsp3BQRMvsEmIsmVj5+5YYQUelruUJkDV47I4znGNgQSEMmTCRvRQ\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Wed, 25 Jan 2012 15:05:14 -0000\r
55 \r
56 If the region to be hidden with a button by\r
57 `notmuch-wash-region-to-button' starts at the beginning of the buffer,\r
58 the invisible region will include the inserted button. This is\r
59 unfortunate, as it means that it is not possible to see the button to\r
60 be pressed.\r
61 \r
62 Make a little space at the start of the buffer before inserting the\r
63 button to avoid this, not forgetting to remove the inserted space upon\r
64 completion.\r
65 ---\r
66 \r
67 This is a hack, but I couldn't see another way around it. Can anyone\r
68 find a better solution?\r
69 \r
70  emacs/notmuch-wash.el |   57 ++++++++++++++++++++++++++++++++----------------\r
71  1 files changed, 38 insertions(+), 19 deletions(-)\r
72 \r
73 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
74 index 5c1e830..4afd3b3 100644\r
75 --- a/emacs/notmuch-wash.el\r
76 +++ b/emacs/notmuch-wash.el\r
77 @@ -147,25 +147,44 @@ insert before the button, probably for indentation."\r
78    ;; symbols because of the way the button code works. Note that\r
79    ;; replacing intern-soft with make-symbol will cause this to fail,\r
80    ;; since the newly created symbol has no plist.\r
81 -\r
82 -  (let ((overlay (make-overlay beg end))\r
83 -       (message-invis-spec (plist-get msg :message-invis-spec))\r
84 -       (invis-spec (make-symbol (concat "notmuch-" type "-region")))\r
85 -       (button-type (intern-soft (concat "notmuch-wash-button-"\r
86 -                                         type "-toggle-type"))))\r
87 -    (add-to-invisibility-spec invis-spec)\r
88 -    (overlay-put overlay 'invisible (list invis-spec message-invis-spec))\r
89 -    (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)\r
90 -    (overlay-put overlay 'priority 10)\r
91 -    (overlay-put overlay 'type type)\r
92 -    (goto-char (1+ end))\r
93 -    (save-excursion\r
94 -      (goto-char (1- beg))\r
95 -      (insert prefix)\r
96 -      (insert-button (notmuch-wash-button-label overlay)\r
97 -                    'invisibility-spec invis-spec\r
98 -                    'overlay overlay\r
99 -                    :type button-type))))\r
100 +  (save-excursion\r
101 +    ;; If the beginning of the region to be converted to a button is the\r
102 +    ;; beginning of the buffer we must move forward a little to avoid\r
103 +    ;; creating an overlay that will hide the button intended to be used\r
104 +    ;; to reveal the hidden region.\r
105 +    (let (scene-of-crime)\r
106 +      (when (eq beg (point-min))\r
107 +       (goto-char (point-min))\r
108 +       (insert "\n")\r
109 +       (setq scene-of-crime (point-min)\r
110 +             beg (point)))\r
111 +\r
112 +      ;; This uses some slightly tricky conversions between strings and\r
113 +      ;; symbols because of the way the button code works. Note that\r
114 +      ;; replacing intern-soft with make-symbol will cause this to fail,\r
115 +      ;; since the newly created symbol has no plist.\r
116 +\r
117 +      (let ((overlay (make-overlay beg end))\r
118 +           (message-invis-spec (plist-get msg :message-invis-spec))\r
119 +           (invis-spec (make-symbol (concat "notmuch-" type "-region")))\r
120 +           (button-type (intern-soft (concat "notmuch-wash-button-"\r
121 +                                             type "-toggle-type"))))\r
122 +       (add-to-invisibility-spec invis-spec)\r
123 +       (overlay-put overlay 'invisible (list invis-spec message-invis-spec))\r
124 +       (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)\r
125 +       (overlay-put overlay 'priority 10)\r
126 +       (overlay-put overlay 'type type)\r
127 +\r
128 +       (goto-char (1- beg))\r
129 +       (insert prefix)\r
130 +       (insert-button (notmuch-wash-button-label overlay)\r
131 +                      'invisibility-spec invis-spec\r
132 +                      'overlay overlay\r
133 +                      :type button-type))\r
134 +\r
135 +      (when scene-of-crime\r
136 +       (goto-char scene-of-crime)\r
137 +       (delete-char 1)))))\r
138  \r
139  (defun notmuch-wash-excerpt-citations (msg depth)\r
140    "Excerpt citations and up to one signature."\r
141 -- \r
142 1.7.8.3\r
143 \r