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.
This commit is contained in:
Jameson Graef Rollins 2011-05-28 14:51:54 -07:00 committed by Carl Worth
parent c62a0d016f
commit da3e47e377

View file

@ -280,6 +280,8 @@ message at DEPTH in the current thread."
'face 'message-mml) 'face 'message-mml)
(defun notmuch-show-insert-part-header (nth content-type declared-type &optional name comment) (defun notmuch-show-insert-part-header (nth content-type declared-type &optional name comment)
(let ((button))
(setq button
(insert-button (insert-button
(concat "[ " (concat "[ "
(if name (concat name ": ") "") (if name (concat name ": ") "")
@ -288,10 +290,13 @@ message at DEPTH in the current thread."
(concat " (as " content-type ")") (concat " (as " content-type ")")
"") "")
(or comment "") (or comment "")
" ]\n") " ]")
:type 'notmuch-show-part-button-type :type 'notmuch-show-part-button-type
:notmuch-part nth :notmuch-part nth
:notmuch-filename name)) :notmuch-filename name))
(insert "\n")
;; return button
button))
;; Functions handling particular MIME parts. ;; Functions handling particular MIME parts.