X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=epa-file.el;h=d4c9fb262fe926c474606f55300d396e4b9162a2;hb=5944a44f16964313efa58244a1ad0e62f32237fb;hp=efd44fcc22b6127c4153f339f13e1fe3405f1596;hpb=575912e1f07111c307b7a615cfe91abe1c2ed3d7;p=elisp%2Fepg.git diff --git a/epa-file.el b/epa-file.el index efd44fc..d4c9fb2 100644 --- a/epa-file.el +++ b/epa-file.el @@ -131,13 +131,14 @@ (setq string (epg-encrypt-string context - (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) + (if (stringp start) + (encode-coding-string start coding-system) + (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. "))))) +If no one is selected, symmetric encryption will be performed. ")))) (error (if (setq entry (assoc file epa-file-passphrase-alist)) (setcdr entry nil))