]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/epg.el (epg-signature-to-string): Use cl-case.
authorJonas Bernoulli <jonas@bernoul.li>
Wed, 15 Jul 2020 17:05:30 +0000 (19:05 +0200)
committerJonas Bernoulli <jonas@bernoul.li>
Thu, 13 Aug 2020 09:29:35 +0000 (11:29 +0200)
In this case we can greatly increase readability by using `cl-case'
instead of `cond'.

lisp/epg.el

index 5b90bc290abdd3efca1aecf4fb06511cf43ea003..65decf3cf5b3647503c301db43c09fbae76fdb3f 100644 (file)
@@ -404,18 +404,13 @@ callback data (if any)."
         (pubkey-algorithm (epg-signature-pubkey-algorithm signature))
         (key-id (epg-signature-key-id signature)))
     (concat
-     (cond ((eq (epg-signature-status signature) 'good)
-           "Good signature from ")
-          ((eq (epg-signature-status signature) 'bad)
-           "Bad signature from ")
-          ((eq (epg-signature-status signature) 'expired)
-           "Expired signature from ")
-          ((eq (epg-signature-status signature) 'expired-key)
-           "Signature made by expired key ")
-          ((eq (epg-signature-status signature) 'revoked-key)
-           "Signature made by revoked key ")
-          ((eq (epg-signature-status signature) 'no-pubkey)
-           "No public key for "))
+     (cl-case (epg-signature-status signature)
+       (good "Good signature from ")
+       (bad "Bad signature from ")
+       (expired "Expired signature from ")
+       (expired-key "Signature made by expired key ")
+       (revoked-key "Signature made by revoked key ")
+       (no-pubkey "No public key for "))
      key-id
      (if user-id
         (concat " "