From da3e47e377411a2f2aa5d7f76e626d4926ed2c7c Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 28 May 2011 14:51:54 -0700 Subject: [PATCH] emacs: fix notmuch-show-part-button to not include newline This makes the button cleaner, so that it doesn't include the entire rest of the line that the button is on. --- emacs/notmuch-show.el | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 40cf74e8..47757a91 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -280,18 +280,23 @@ message at DEPTH in the current thread." 'face 'message-mml) (defun notmuch-show-insert-part-header (nth content-type declared-type &optional name comment) - (insert-button - (concat "[ " - (if name (concat name ": ") "") - declared-type - (if (not (string-equal declared-type content-type)) - (concat " (as " content-type ")") - "") - (or comment "") - " ]\n") - :type 'notmuch-show-part-button-type - :notmuch-part nth - :notmuch-filename name)) + (let ((button)) + (setq button + (insert-button + (concat "[ " + (if name (concat name ": ") "") + declared-type + (if (not (string-equal declared-type content-type)) + (concat " (as " content-type ")") + "") + (or comment "") + " ]") + :type 'notmuch-show-part-button-type + :notmuch-part nth + :notmuch-filename name)) + (insert "\n") + ;; return button + button)) ;; Functions handling particular MIME parts. -- 2.43.0