[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42397: [PATCH 01/14] ; * lisp/epg.el (epg-signature-to-string): Use
From: |
Robert Pluim |
Subject: |
bug#42397: [PATCH 01/14] ; * lisp/epg.el (epg-signature-to-string): Use cl-case. |
Date: |
Thu, 16 Jul 2020 19:22:13 +0200 |
>>>>> On Thu, 16 Jul 2020 16:54:43 +0200, Jonas Bernoulli <jonas@bernoul.li>
>>>>> said:
Jonas> In this case we can greatly increase readability by using `cl-case'
Jonas> instead of `cond'.
Jonas> ---
Jonas> lisp/epg.el | 19 +++++++------------
Jonas> 1 file changed, 7 insertions(+), 12 deletions(-)
Jonas> diff --git a/lisp/epg.el b/lisp/epg.el
Jonas> index 222fd913e1..e97db65b60 100644
Jonas> --- a/lisp/epg.el
Jonas> +++ b/lisp/epg.el
Jonas> @@ -404,18 +404,13 @@ epg-signature-to-string
Jonas> (pubkey-algorithm (epg-signature-pubkey-algorithm signature))
Jonas> (key-id (epg-signature-key-id signature)))
Jonas> (concat
Jonas> - (cond ((eq (epg-signature-status signature) 'good)
Jonas> - "Good signature from ")
Jonas> - ((eq (epg-signature-status signature) 'bad)
Jonas> - "Bad signature from ")
Jonas> - ((eq (epg-signature-status signature) 'expired)
Jonas> - "Expired signature from ")
Jonas> - ((eq (epg-signature-status signature) 'expired-key)
Jonas> - "Signature made by expired key ")
Jonas> - ((eq (epg-signature-status signature) 'revoked-key)
Jonas> - "Signature made by revoked key ")
Jonas> - ((eq (epg-signature-status signature) 'no-pubkey)
Jonas> - "No public key for "))
Jonas> + (cl-case signature
Jonas> + (good "Good signature from ")
Jonas> + (bad "Bad signature from ")
Jonas> + (expired "Expired signature from ")
Jonas> + (expired-key "Signature made by expired key ")
Jonas> + (revoked-key "Signature made by revoked key ")
Jonas> + (no-pubkey "No public key for "))
Did you drop the `epg-signature-status' accessor on purpose here?
Robert
- bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation., (continued)
- bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation., Basil L. Contovounesios, 2020/07/17
- bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation., Jonas Bernoulli, 2020/07/17
- bug#42397: [PATCH 03/14] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message., Eli Zaretskii, 2020/07/16
- bug#42397: [PATCH 03/14] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 02/14] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor., Robert Pluim, 2020/07/16
- bug#42397: [PATCH 02/14] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor., Jonas Bernoulli, 2020/07/16
bug#42397: [PATCH 01/14] ; * lisp/epg.el (epg-signature-to-string): Use cl-case.,
Robert Pluim <=
bug#42397: This message is a test, Jonas Bernoulli, 2020/07/16
bug#42397: [PATCH 00/14] Use outline headings and some cosmetics, Drew Adams, 2020/07/16