+ (epg-context-set-progress-callback context
+ #'epa-progress-callback-function)
+ (condition-case error
+ (setq string
+ (epg-encrypt-string
+ context
+ (if (stringp start)
+ (epa-file--encode-coding-string start coding-system)
+ (epa-file--encode-coding-string (buffer-substring start end)
+ coding-system))
+ (unless (assoc file epa-file-passphrase-alist)
+ (epa-select-keys
+ context
+ "Select recipents for encryption.
+If no one is selected, symmetric encryption will be performed. "
+ (cond
+ ((listp epa-file-encrypt-to) epa-file-encrypt-to)
+ ((stringp epa-file-encrypt-to) (list epa-file-encrypt-to)))))))
+ (error
+ (if (setq entry (assoc file epa-file-passphrase-alist))
+ (setcdr entry nil))
+ (signal 'file-error (cons "Opening output file" (cdr error)))))