Commit e78c15ac authored by Jonas Bernoulli's avatar Jonas Bernoulli

Drop unnecessary backward compatibility aliases

We can assume that `encode-coding-string' and `decode-coding-string'
are available; they were added in 1997.

* lisp/epa-file.el (epa-file--encode-coding-string)
(epa-file--decode-coding-string): Remove aliases for
encode-coding-string and decode-coding-string.
* lisp/epa-file.el (epa-file-write-region): Use encode-coding-string
instead of removed epa-file--encode-coding-string.
parent 0e2af5cc
......@@ -51,16 +51,6 @@ encryption is used."
(defvar epa-file-passphrase-alist nil)
(if (fboundp 'encode-coding-string)
(defalias 'epa-file--encode-coding-string 'encode-coding-string)
(defalias 'epa-file--encode-coding-string 'identity)))
(if (fboundp 'decode-coding-string)
(defalias 'epa-file--decode-coding-string 'decode-coding-string)
(defalias 'epa-file--decode-coding-string 'identity)))
(defun epa-file-passphrase-callback-function (context key-id file)
(if (and epa-file-cache-passphrase-for-symmetric-encryption
(eq key-id 'SYM))
......@@ -236,11 +226,7 @@ encryption is used."
(setq file (expand-file-name file))
(let* ((coding-system (or coding-system-for-write
(if (fboundp 'select-safe-coding-system)
;; 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)))
(let ((buffer-file-name file))
(point-min) (point-max)))
......@@ -266,7 +252,7 @@ encryption is used."
(if (stringp start)
(epa-file--encode-coding-string start coding-system)
(encode-coding-string start coding-system)
(unless start
(setq start (point-min)
end (point-max)))
......@@ -280,8 +266,8 @@ encryption is used."
;; decrypted contents.
(format-encode-buffer (with-current-buffer buffer
(epa-file--encode-coding-string (buffer-string)
(encode-coding-string (buffer-string)
(if (or (eq epa-file-select-keys t)
(and (null epa-file-select-keys)
(not (local-variable-p 'epa-file-encrypt-to
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment