unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: aneesh.kumar@gmail.com
To: cworth@cworth.org, aneesh.kumar@linux.vnet.ibm.com
Cc: notmuch@notmuchmail.org
Subject: [PATCH 1/3] Use default face for the button types so that the underlines go away
Date: Tue,  1 Dec 2009 21:45:47 +0530	[thread overview]
Message-ID: <1259684149-9574-1-git-send-email-aneesh.kumar@gmail.com> (raw)

From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>

Since we know what these buttons do it seems like the underlines are
unnecessary. This also backs out the attempt at fixing the button
alignment on the message row, which is broken because of some
interaction with indent-rigidly in some threads
---
 notmuch.el |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index 65473ba..c1e8257 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -560,15 +560,23 @@ which this thread was originally shown."
   (force-window-update)
   (redisplay t))
 
-(define-button-type 'notmuch-button-invisibility-toggle-type 'action 'notmuch-toggle-invisible-action 'follow-link t)
-(define-button-type 'notmuch-button-citation-toggle-type 'help-echo "mouse-1, RET: Show citation"
+(define-button-type 'notmuch-button-invisibility-toggle-type
+  'action 'notmuch-toggle-invisible-action
+  'follow-link t
+  'face "default")
+(define-button-type 'notmuch-button-citation-toggle-type
+  'help-echo "mouse-1, RET: Show citation"
   :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-signature-toggle-type 'help-echo "mouse-1, RET: Show signature"
+(define-button-type 'notmuch-button-signature-toggle-type
+  'help-echo "mouse-1, RET: Show signature"
   :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-headers-toggle-type 'help-echo "mouse-1, RET: Show headers"
-  :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-body-toggle-type 'help-echo "mouse-1, RET: Show message"
+(define-button-type 'notmuch-button-headers-toggle-type
+  'help-echo "mouse-1, RET: Show headers"
   :supertype 'notmuch-button-invisibility-toggle-type)
+(define-button-type 'notmuch-button-body-toggle-type 
+  'help-echo "mouse-1, RET: Show message"
+  'face '(:inverse-video . t)
+  :supertype 'notmuch-button-invisibility-toggle-type )
 
 (defun notmuch-show-markup-citations-region (beg end depth)
   (goto-char beg)
@@ -715,8 +723,11 @@ which this thread was originally shown."
         (btn nil))
     (end-of-line)
     ; Inverse video for subject
-    (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t))
-    (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type))
+    (let ((message-overlay (make-overlay beg (point))))
+      (overlay-put message-overlay 'face '(:inverse-video t))
+      (setq btn (make-button (line-beginning-position)
+			     (overlay-end message-overlay)
+			     :type 'notmuch-button-body-toggle-type)))
     (forward-line 1)
     (end-of-line)
     (let ((beg-hidden (point-marker)))
-- 
1.6.5.2.74.g610f9

             reply	other threads:[~2009-12-01 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 16:15 aneesh.kumar [this message]
2009-12-01 16:15 ` [PATCH 2/3] notmuch.el: Fix the message summary button to be active even on first column aneesh.kumar
2009-12-01 16:15   ` [PATCH 3/3] notmuch.el: Support for customizing search result display aneesh.kumar
2009-12-02 12:49     ` [PATCH -v2] " Aneesh Kumar K.V
2009-12-11  5:34       ` Aneesh Kumar K. V
2010-02-05 19:55       ` Carl Worth
2010-02-11 16:41         ` [PATCH -V3] " Aneesh Kumar K.V
2010-02-11 17:17           ` Aneesh Kumar K. V
2009-12-03 21:04 ` [PATCH 1/3] Use default face for the button types so that the underlines go away Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259684149-9574-1-git-send-email-aneesh.kumar@gmail.com \
    --to=aneesh.kumar@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cworth@cworth.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).