diff options
author | Daiki Ueno <ueno@gnu.org> | 2012-12-26 13:20:21 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2012-12-26 13:20:21 +0900 |
commit | f1c9aabc1808431ccd75916a0f277235f7c7f187 (patch) | |
tree | bac05d2b837a6ea2e099d1efff4f5edb53ddfe7b /lisp/epg.el | |
parent | 12384b01a92b5f2ac9af84767e04993efd6a18cc (diff) | |
download | emacs-f1c9aabc1808431ccd75916a0f277235f7c7f187.tar.gz |
Move photo ID display code from epg.el to gnus/mml2015.el.
2012-12-26 Daiki Ueno <ueno@gnu.org>
* mml2015.el (mml2015-epg-signature-to-string): New function.
(mml2015-epg-verify-result-to-string): New function.
(mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-verify)
(mml2015-epg-clear-verify): Use mml2015-epg-verify-result-to-string
instead of epg-verify-result-to-string.
(epg-signature-key-id, epg-signature-to-string): Autoload.
(epg-verify-result-to-string): Remove autoload.
2012-12-25 Adam Sjøgren <asjo@koldfront.dk>
* mml2015.el (mml2015-epg-key-image): New function, to retrieve photo
ID image from GPG public key.
(mml2015-epg-key-image-to-string): New function.
Diffstat (limited to 'lisp/epg.el')
-rw-r--r-- | lisp/epg.el | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lisp/epg.el b/lisp/epg.el index b79c5df4165..280c24616f2 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -967,34 +967,12 @@ This function is for internal use only." (setcdr entry value) (epg-context-set-result context (cons (cons name value) result))))) -(defun epg-key-image (key-id) - "Return the image of a key, if any" - (let ((filename - (replace-regexp-in-string - "\n" "" - (shell-command-to-string - (concat "/usr/bin/gpg --photo-viewer 'echo %I >&2' --list-keys " - key-id " > /dev/null"))))) - (when (and (not (string-equal filename "")) - (file-exists-p filename)) - (create-image filename)))) - -(defun epg-key-image-to-string (key-id) - "Return a string with the image of a key, if any" - (let* ((result "") - (key-image (epg-key-image key-id))) - (when key-image - (setq result " ") - (put-text-property 1 2 'display key-image result)) - result)) - (defun epg-signature-to-string (signature) "Convert SIGNATURE to a human readable string." (let* ((user-id (cdr (assoc (epg-signature-key-id signature) epg-user-id-alist))) (pubkey-algorithm (epg-signature-pubkey-algorithm signature)) - (key-id (epg-signature-key-id signature)) - (key-image (epg-key-image-to-string key-id))) + (key-id (epg-signature-key-id signature))) (concat (cond ((eq (epg-signature-status signature) 'good) "Good signature from ") @@ -1009,7 +987,6 @@ This function is for internal use only." ((eq (epg-signature-status signature) 'no-pubkey) "No public key for ")) key-id - key-image (if user-id (concat " " (if (stringp user-id) |