-(define-button-type 'notmuch-button-headers-toggle-type
- 'help-echo "mouse-1, RET: Show headers"
- :supertype 'notmuch-button-invisibility-toggle-type)
+;;
+
+(defun notmuch-version ()
+ "Return a string with the notmuch version number."
+ (let ((long-string
+ ;; Trim off the trailing newline.
+ (substring (shell-command-to-string
+ (concat notmuch-command " --version"))
+ 0 -1)))
+ (if (string-match "^notmuch\\( version\\)? \\(.*\\)$"
+ long-string)
+ (match-string 2 long-string)
+ "unknown")))
+
+;;