Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 0e / 41a6f6fc38e155c192997c3bfa30e27970b487
1 Return-Path: <aneesh.kumar@gmail.com>\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 CD3C8431FBD\r
6         for <notmuch@notmuchmail.org>; Tue,  1 Dec 2009 08:16:00 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id 4hHYmE9jZs4a for <notmuch@notmuchmail.org>;\r
11         Tue,  1 Dec 2009 08:15:59 -0800 (PST)\r
12 Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144])\r
13         by olra.theworths.org (Postfix) with ESMTP id 49E95431FBC\r
14         for <notmuch@notmuchmail.org>; Tue,  1 Dec 2009 08:15:59 -0800 (PST)\r
15 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246])\r
16         by e23smtp02.au.ibm.com (8.14.3/8.13.1) with ESMTP id nB1GDHfR009947\r
17         for <notmuch@notmuchmail.org>; Wed, 2 Dec 2009 03:13:17 +1100\r
18 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139])\r
19         by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
20         nB1GCMOp1450122\r
21         for <notmuch@notmuchmail.org>; Wed, 2 Dec 2009 03:12:22 +1100\r
22 Received: from d23av04.au.ibm.com (loopback [127.0.0.1])\r
23         by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id\r
24         nB1GFu5f008651\r
25         for <notmuch@notmuchmail.org>; Wed, 2 Dec 2009 03:15:57 +1100\r
26 Received: from localhost.localdomain ([9.124.215.21])\r
27         by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
28         nB1GFr3g008630; Wed, 2 Dec 2009 03:15:54 +1100\r
29 From: aneesh.kumar@gmail.com\r
30 To: cworth@cworth.org, aneesh.kumar@linux.vnet.ibm.com\r
31 Date: Tue,  1 Dec 2009 21:45:47 +0530\r
32 Message-Id: <1259684149-9574-1-git-send-email-aneesh.kumar@gmail.com>\r
33 X-Mailer: git-send-email 1.6.5.2.74.g610f9\r
34 X-Mailman-Approved-At: Tue, 01 Dec 2009 08:25:29 -0800\r
35 Cc: notmuch@notmuchmail.org\r
36 Subject: [notmuch] [PATCH 1/3] Use default face for the button types so that\r
37         the underlines go away\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.12\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Tue, 01 Dec 2009 16:16:01 -0000\r
51 \r
52 From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>\r
53 \r
54 Since we know what these buttons do it seems like the underlines are\r
55 unnecessary. This also backs out the attempt at fixing the button\r
56 alignment on the message row, which is broken because of some\r
57 interaction with indent-rigidly in some threads\r
58 ---\r
59  notmuch.el |   27 +++++++++++++++++++--------\r
60  1 files changed, 19 insertions(+), 8 deletions(-)\r
61 \r
62 diff --git a/notmuch.el b/notmuch.el\r
63 index 65473ba..c1e8257 100644\r
64 --- a/notmuch.el\r
65 +++ b/notmuch.el\r
66 @@ -560,15 +560,23 @@ which this thread was originally shown."\r
67    (force-window-update)\r
68    (redisplay t))\r
69  \r
70 -(define-button-type 'notmuch-button-invisibility-toggle-type 'action 'notmuch-toggle-invisible-action 'follow-link t)\r
71 -(define-button-type 'notmuch-button-citation-toggle-type 'help-echo "mouse-1, RET: Show citation"\r
72 +(define-button-type 'notmuch-button-invisibility-toggle-type\r
73 +  'action 'notmuch-toggle-invisible-action\r
74 +  'follow-link t\r
75 +  'face "default")\r
76 +(define-button-type 'notmuch-button-citation-toggle-type\r
77 +  'help-echo "mouse-1, RET: Show citation"\r
78    :supertype 'notmuch-button-invisibility-toggle-type)\r
79 -(define-button-type 'notmuch-button-signature-toggle-type 'help-echo "mouse-1, RET: Show signature"\r
80 +(define-button-type 'notmuch-button-signature-toggle-type\r
81 +  'help-echo "mouse-1, RET: Show signature"\r
82    :supertype 'notmuch-button-invisibility-toggle-type)\r
83 -(define-button-type 'notmuch-button-headers-toggle-type 'help-echo "mouse-1, RET: Show headers"\r
84 -  :supertype 'notmuch-button-invisibility-toggle-type)\r
85 -(define-button-type 'notmuch-button-body-toggle-type 'help-echo "mouse-1, RET: Show message"\r
86 +(define-button-type 'notmuch-button-headers-toggle-type\r
87 +  'help-echo "mouse-1, RET: Show headers"\r
88    :supertype 'notmuch-button-invisibility-toggle-type)\r
89 +(define-button-type 'notmuch-button-body-toggle-type \r
90 +  'help-echo "mouse-1, RET: Show message"\r
91 +  'face '(:inverse-video . t)\r
92 +  :supertype 'notmuch-button-invisibility-toggle-type )\r
93  \r
94  (defun notmuch-show-markup-citations-region (beg end depth)\r
95    (goto-char beg)\r
96 @@ -715,8 +723,11 @@ which this thread was originally shown."\r
97          (btn nil))\r
98      (end-of-line)\r
99      ; Inverse video for subject\r
100 -    (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t))\r
101 -    (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type))\r
102 +    (let ((message-overlay (make-overlay beg (point))))\r
103 +      (overlay-put message-overlay 'face '(:inverse-video t))\r
104 +      (setq btn (make-button (line-beginning-position)\r
105 +                            (overlay-end message-overlay)\r
106 +                            :type 'notmuch-button-body-toggle-type)))\r
107      (forward-line 1)\r
108      (end-of-line)\r
109      (let ((beg-hidden (point-marker)))\r
110 -- \r
111 1.6.5.2.74.g610f9\r
112 \r