[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9446088 01/15: ; * lisp/epg.el (epg-signature-to-string): Use cl-
From: |
Jonas Bernoulli |
Subject: |
master 9446088 01/15: ; * lisp/epg.el (epg-signature-to-string): Use cl-case. |
Date: |
Thu, 13 Aug 2020 05:36:53 -0400 (EDT) |
branch: master
commit 944608851c81e279287051c2a243faee7b59f3be
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
; * lisp/epg.el (epg-signature-to-string): Use cl-case.
In this case we can greatly increase readability by using `cl-case'
instead of `cond'.
---
lisp/epg.el | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/lisp/epg.el b/lisp/epg.el
index 5b90bc2..65decf3 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -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 " "
- master updated (804a0e8 -> 838a1a3), Jonas Bernoulli, 2020/08/13
- master 7ba7591 02/15: ; * lisp/epg.el (epg-signature-to-string): Tiny refactor., Jonas Bernoulli, 2020/08/13
- master 562bbd0 03/15: ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message., Jonas Bernoulli, 2020/08/13
- master 9446088 01/15: ; * lisp/epg.el (epg-signature-to-string): Use cl-case.,
Jonas Bernoulli <=
- master cb58a3c 09/15: * test/src/emacs-module-tests.el: Use proper outline headings., Jonas Bernoulli, 2020/08/13
- master e118b79 10/15: * lisp/obsolete/longlines.el: Use proper outline headings., Jonas Bernoulli, 2020/08/13
- master b88e5b4 12/15: * lisp/font-lock.el: Split the Commentary into subsections., Jonas Bernoulli, 2020/08/13
- master c5b9d2a 04/15: Split EasyPG libraries into outline sections, Jonas Bernoulli, 2020/08/13
- master 838a1a3 15/15: Update section heading conventions for libraries, Jonas Bernoulli, 2020/08/13
- master 2d93342 13/15: * lisp/font-lock.el: No longer use headings as end of section markers., Jonas Bernoulli, 2020/08/13
- master aaa69dc 06/15: * lisp/progmodes/compile.el: Remove unnecessary comments., Jonas Bernoulli, 2020/08/13
- master 7cb029d 14/15: ; * lisp/emacs-lisp/autoload.el: Begin summary line with three semicolons., Jonas Bernoulli, 2020/08/13
- master 5409732 11/15: * lisp/net/imap.el: Use proper outline headings, Jonas Bernoulli, 2020/08/13
- master 0bc9e7b 05/15: Merge two conditions and fix indentation, Jonas Bernoulli, 2020/08/13