[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e78c15a 5/8: Drop unnecessary backward compatibility aliases
From: |
Jonas Bernoulli |
Subject: |
master e78c15a 5/8: Drop unnecessary backward compatibility aliases |
Date: |
Wed, 15 Jul 2020 12:12:29 -0400 (EDT) |
branch: master
commit e78c15acf679259caea6566446f61966cea032aa
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
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.
---
lisp/epa-file.el | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index 22c3dc1..14a169b 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -51,16 +51,6 @@ encryption is used."
(defvar epa-file-passphrase-alist nil)
-(eval-and-compile
- (if (fboundp 'encode-coding-string)
- (defalias 'epa-file--encode-coding-string 'encode-coding-string)
- (defalias 'epa-file--encode-coding-string 'identity)))
-
-(eval-and-compile
- (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))
(select-safe-coding-system
(point-min) (point-max)))
buffer-file-coding-system)))
@@ -266,7 +252,7 @@ encryption is used."
(epg-encrypt-string
context
(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
buffer-file-format))
- (epa-file--encode-coding-string (buffer-string)
- coding-system)))
+ (encode-coding-string (buffer-string)
+ coding-system)))
(if (or (eq epa-file-select-keys t)
(and (null epa-file-select-keys)
(not (local-variable-p 'epa-file-encrypt-to
- master updated (363f1d4 -> 58bec88), Jonas Bernoulli, 2020/07/15
- master 0e2af5c 4/8: Improve and add doc-strings, Jonas Bernoulli, 2020/07/15
- master 9f82622 6/8: Cosmetic changes to epa libraries, Jonas Bernoulli, 2020/07/15
- master c2ef4a1 1/8: * lisp/epa.el (epa-faces): Move definition., Jonas Bernoulli, 2020/07/15
- master bb6fe68 2/8: Add all epa faces to epa-faces Custom group, Jonas Bernoulli, 2020/07/15
- master 8c60347 7/8: epa-key-list-mode-map: Use widget-keymap as parent keymap, Jonas Bernoulli, 2020/07/15
- master da6edaf 3/8: * lisp/epg-config.el (epg-config--make-gpg-configuration): Fix indentation., Jonas Bernoulli, 2020/07/15
- master e78c15a 5/8: Drop unnecessary backward compatibility aliases,
Jonas Bernoulli <=
- master 58bec88 8/8: * lisp/epa.el (epa-show-key): New command., Jonas Bernoulli, 2020/07/15