Fix encoding of text when saving a gpg-encoded file
* lisp/epa-file.el (epa-file-write-region): Revert inadvertent change from July 15, 2020 which broke selection of a correct encoding for stuff sent to 'gpg'. (Bug#71080)
This commit is contained in:
parent
984fb346fd
commit
d50e3226b1
1 changed files with 8 additions and 1 deletions
|
@ -267,7 +267,14 @@ encryption is used."
|
|||
(setq file (expand-file-name file))
|
||||
(let* ((coding-system (or coding-system-for-write
|
||||
(if (fboundp 'select-safe-coding-system)
|
||||
(let ((buffer-file-name file))
|
||||
;; This is needed because
|
||||
;; `auto-coding-alist' has
|
||||
;; `no-conversion' for *.gpg files,
|
||||
;; which would otherwise force
|
||||
;; `select-safe-coding-system' return
|
||||
;; `no-conversion'.
|
||||
(let ((buffer-file-name
|
||||
(file-name-sans-extension file)))
|
||||
(select-safe-coding-system
|
||||
(point-min) (point-max)))
|
||||
buffer-file-coding-system)))
|
||||
|
|
Loading…
Add table
Reference in a new issue