From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#41268: [PATCH 6/9] Drop unnecessary backward compatibility aliases Date: Thu, 14 May 2020 21:13:22 +0200 Message-ID: <20200514191325.22061-7-jonas@bernoul.li> References: <20200514191325.22061-1-jonas@bernoul.li> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="15830"; mail-complaints-to="usenet@ciao.gmane.io" To: 41268@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 14 21:14:28 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZJJM-00040f-16 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 21:14:28 +0200 Original-Received: from localhost ([::1]:50244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZJJK-00065h-U6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 15:14:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZJIw-00064j-NK for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZJIw-0005U4-Ei for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZJIw-0001Tm-A4 for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 May 2020 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15894836155512 (code B ref -1); Thu, 14 May 2020 19:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 May 2020 19:13:35 +0000 Original-Received: from localhost ([127.0.0.1]:34873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZJIV-0001Qp-6G for submit@debbugs.gnu.org; Thu, 14 May 2020 15:13:35 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZJIT-0001Qi-W0 for submit@debbugs.gnu.org; Thu, 14 May 2020 15:13:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZJIT-0005mu-R5 for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:13:33 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:50314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZJIQ-0005Om-6T for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:13:33 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 5E13C166B6 for ; Thu, 14 May 2020 21:13:27 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id yAG5CVJfYeho for ; Thu, 14 May 2020 21:13:26 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 8BBEF166BF for ; Thu, 14 May 2020 21:13:26 +0200 (CEST) X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200514191325.22061-1-jonas@bernoul.li> Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/14 15:13:27 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180247 Archived-At: * 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. encode-coding-string and decode-coding-string existed every since 4ed4686978bd18292e2bb7b87a7b0e0407ecb3b1 added them in 1997. --- 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 ede7177054..3e23c09a51 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -56,16 +56,6 @@ epa-file-select-keys (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)) @@ -243,11 +233,7 @@ epa-file-write-region (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))) @@ -273,7 +259,7 @@ epa-file-write-region (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))) @@ -287,8 +273,8 @@ epa-file-write-region ;; 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 -- 2.26.0