Fixed user-id caching.
authorueno <ueno>
Sat, 29 Apr 2006 23:32:13 +0000 (23:32 +0000)
committerueno <ueno>
Sat, 29 Apr 2006 23:32:13 +0000 (23:32 +0000)
epg.el

diff --git a/epg.el b/epg.el
index 13a8535..6989498 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -1185,7 +1185,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-string
+               (epg-user-id-string (car (epg-key-user-id-list (car keys))))
+               entry (assoc key-id epg-user-id-alist))
+         (if entry
+             (setcdr entry user-id-string)
+           (setq epg-user-id-alist (cons (cons key-id user-id-string)
+                                         epg-user-id-alist))))
     (nreverse keys)))
 
 (if (fboundp 'make-temp-file)