Added 0.0.10 changes.
[elisp/epg.git] / epa-file.el
index f086f90..1f939c1 100644 (file)
@@ -164,10 +164,9 @@ May either be a string or a list of strings.")
       (error "Can't append to the file."))
   (setq file (expand-file-name file))
   (let* ((coding-system (or coding-system-for-write
-                           (if (boundp 'last-coding-system-used)
-                               (condition-case nil
-                                   (write-region (point-min) (point-max) "/")
-                                 (error last-coding-system-used))
+                           (if (fboundp 'select-safe-coding-system)
+                               (select-safe-coding-system
+                                (point-min) (point-max))
                              buffer-file-coding-system)))
         (context (epg-make-context))
         (coding-system-for-write 'binary)