- (let* ((status (plist-get encstatus :status))
- (help-msg nil)
- (label "Decryption not attempted")
- (face 'notmuch-crypto-decryption))
- (cond
- ((string= status "good")
- (setq label "Decryption successful"))
- ((string= status "bad")
- (setq label "Decryption error"))
- (t
- (setq label (concat "Unknown encryption status"
- (if status (concat ": " status))))))
- (insert-button
- (concat "[ " label " ]")
- :type 'notmuch-crypto-status-button-type
- 'help-echo help-msg
- 'face face
- 'mouse-face face)
- (insert "\n")))
+ "Insert a button describing the encryption status ENCSTATUS."
+ (insert-button
+ (concat "[ "
+ (let ((status (plist-get encstatus :status)))
+ (cond
+ ((string= status "good")
+ "Decryption successful")
+ ((string= status "bad")
+ "Decryption error")
+ (t
+ (concat "Unknown encryption status"
+ (and status (concat ": " status))))))
+ " ]")
+ :type 'notmuch-crypto-status-button-type
+ 'face 'notmuch-crypto-decryption
+ 'mouse-face 'notmuch-crypto-decryption)
+ (insert "\n"))