From: ueno Date: Sat, 29 Apr 2006 23:25:09 +0000 (+0000) Subject: * epg.el (epg-list-keys): Cache user-id in epg-user-id-alist. X-Git-Tag: epg-0_0_2~78 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa784f930accec69284c90a2a78b2427fa31d5f4;p=elisp%2Fepg.git * epg.el (epg-list-keys): Cache user-id in epg-user-id-alist. --- diff --git a/ChangeLog b/ChangeLog index d941792..32df26d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ digest-algorithm. (epg-process-sentinel): Abolished. (epg-signature-to-string): Decode DN. + (epg-list-keys): Cache user-id in epg-user-id-alist. 2006-04-29 Daiki Ueno diff --git a/epg.el b/epg.el index 9e0e249..fdeb3da 100644 --- a/epg.el +++ b/epg.el @@ -1127,7 +1127,7 @@ If MODE is t or 'secret, only secret keyring should be searched. Otherwise, only public keyring should be searched and the key signatures should be included." (let ((lines (epg-list-keys-1 context name mode)) - keys cert) + keys cert key-id user-id-name entry) (while lines (cond ((member (aref (car lines) 0) '("pub" "sec" "crt" "crs")) @@ -1137,7 +1137,16 @@ signatures should be included." (nreverse (epg-key-sub-key-list (car keys)))) (epg-key-set-user-id-list (car keys) - (nreverse (epg-key-user-id-list (car keys))))) + (nreverse (epg-key-user-id-list (car keys)))) + (setq key-id + (epg-sub-key-id (car (epg-key-sub-key-list (car keys)))) + user-id-name + (epg-user-id-name (car (epg-key-user-id-list (car keys)))) + entry (assoc key-id epg-user-id-alist)) + (if entry + (setcdr entry user-id-name) + (setq epg-user-id-alist (cons (cons key-id user-id-name) + epg-user-id-alist)))) (setq cert (member (aref (car lines) 0) '("crt" "crs")) keys (cons (epg-make-key (if (aref (car lines) 8)