+2007-02-02 Daiki Ueno <ueno@unixuser.org>
+
+ * epa-file.el (epa-file-write-region): Set a dummy filename
+ for buffer-file-name when calling select-safe-coding-system.
+
2007-01-30 Daiki Ueno <ueno@unixuser.org>
* epg.el (epg-last-status): New variable.
(setq file (expand-file-name file))
(let* ((coding-system (or coding-system-for-write
(if (fboundp 'select-safe-coding-system)
- (select-safe-coding-system
- (point-min) (point-max))
+ ;; This is needed since Emacs 22 has
+ ;; no-conversion setting for *.gpg in
+ ;; `auto-coding-alist'.
+ (let ((buffer-file-name
+ (file-name-sans-extension file)))
+ (select-safe-coding-system
+ (point-min) (point-max)))
buffer-file-coding-system)))
(context (epg-make-context))
(coding-system-for-write 'binary)