aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Jameson Graef Rollins <jrollins@finestructure.net>2011-05-28 14:51:54 -0700
committerGravatar Carl Worth <cworth@cworth.org>2011-06-03 12:37:55 -0700
commitda3e47e377411a2f2aa5d7f76e626d4926ed2c7c (patch)
tree9c623ea1562608793fb6de4a5da9c35426d19c1a /emacs
parentc62a0d016f79d6a55d62352029e74d09d4a2f438 (diff)
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.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-show.el29
1 files 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.