+(defun notmuch-wash-button-label (overlay)
+ (let* ((type (overlay-get overlay 'type))
+ (invis-spec (overlay-get overlay 'invisible))
+ (state (if (invisible-p invis-spec) "hidden" "visible"))
+ (label-format (symbol-value (intern-soft (concat "notmuch-wash-button-"
+ type "-" state "-format"))))
+ (lines-count (count-lines (overlay-start overlay) (overlay-end overlay))))
+ (format label-format lines-count)))
+
+(defun notmuch-wash-region-to-button (beg end type prefix)