[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42397: [PATCH v2 04/16] * lisp/epa.el (epa--derived-mode-p): Remove
From: |
Jonas Bernoulli |
Subject: |
bug#42397: [PATCH v2 04/16] * lisp/epa.el (epa--derived-mode-p): Remove unnecessary alias. |
Date: |
Mon, 10 Aug 2020 23:14:18 +0200 |
`derived-mode-p' was added twenty years ago in
6ad501012b9a9ddc26dd8ce1cef8332ee16d87df and by
now we can just assume that it exists.
---
lisp/epa.el | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/lisp/epa.el b/lisp/epa.el
index 3c7dd8309a..fc7ad5efab 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -1105,17 +1105,6 @@ epa-sign-region
'start-open t
'end-open t)))))
-(defalias 'epa--derived-mode-p
- (if (fboundp 'derived-mode-p)
- #'derived-mode-p
- (lambda (&rest modes)
- "Non-nil if the current major mode is derived from one of MODES.
-Uses the `derived-mode-parent' property of the symbol to trace backwards."
- (let ((parent major-mode))
- (while (and (not (memq parent modes))
- (setq parent (get parent 'derived-mode-parent))))
- parent))))
-
;;;###autoload
(defun epa-encrypt-region (start end recipients sign signers)
"Encrypt the current region between START and END for RECIPIENTS.
@@ -1227,8 +1216,7 @@ epa-import-keys
(if (epg-context-result-for context 'import)
(epa-display-info (epg-import-result-to-string
(epg-context-result-for context 'import))))
- ;; FIXME: Why not use the (otherwise unused) epa--derived-mode-p?
- (if (eq major-mode 'epa-key-list-mode)
+ (if (derived-mode-p 'epa-key-list-mode)
(apply #'epa--list-keys epa-list-keys-arguments))))
;;;###autoload
--
2.28.0
- bug#42397: [PATCH v2 00/16] Use outline headings and some cosmetics, Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 01/16] ; * lisp/epg.el (epg-signature-to-string): Use cl-case., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 02/16] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 04/16] * lisp/epa.el (epa--derived-mode-p): Remove unnecessary alias.,
Jonas Bernoulli <=
- bug#42397: [PATCH v2 05/16] Split EasyPG libraries into outline sections, Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 06/16] Merge two conditions and fix indentation, Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 03/16] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 07/16] * lisp/progmodes/compile.el: Remove unnecessary comments., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 08/16] ; * lisp/whitespace.el: Capitalize "Code" section heading., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 09/16] * lisp/mail/smtpmail.el: Use outline headings., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 11/16] * lisp/obsolete/longlines.el: Use proper outline headings., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 10/16] * test/src/emacs-module-tests.el: Use proper outline headings., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 15/16] ; * lisp/emacs-lisp/autoload.el: Begin summary line with three semicolons., Jonas Bernoulli, 2020/08/10
- bug#42397: [PATCH v2 16/16] Update section heading conventions for libraries, Jonas Bernoulli, 2020/08/10