* epg.el (epg-sign-file): Signal an error only when a signature is not
[elisp/epg.git] / epa-file.el
index 705f18a..435976c 100644 (file)
               context
               (if (stringp start)
                   (encode-coding-string start coding-system)
-                (encode-coding-string (buffer-string) coding-system))
-              (mapcar (lambda (key)
-                        (epg-sub-key-id (car (epg-key-sub-key-list key))))
-                      (unless (assoc file epa-file-passphrase-alist)
+                (encode-coding-string (buffer-substring start end)
+                                      coding-system))
+              (unless (assoc file epa-file-passphrase-alist)
                         (epa-select-keys
-                   "Select recipents for encryption.
-If no one is selected, symmetric encryption will be performed.  ")))))
+                         context
+                         "Select recipents for encryption.
+If no one is selected, symmetric encryption will be performed.  "))))
       (error
        (if (setq entry (assoc file epa-file-passphrase-alist))
           (setcdr entry nil))