[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42397: [PATCH 04/14] * lisp/epa.el (epa--derived-mode-p): Remove unn
From: |
Jonas Bernoulli |
Subject: |
bug#42397: [PATCH 04/14] * lisp/epa.el (epa--derived-mode-p): Remove unnecessary alias. |
Date: |
Thu, 16 Jul 2020 16:54:46 +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.26.0
- bug#42397: [PATCH 00/14] Use outline headings and some cosmetics, Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 01/14] ; * lisp/epg.el (epg-signature-to-string): Use cl-case., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 02/14] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 03/14] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 04/14] * lisp/epa.el (epa--derived-mode-p): Remove unnecessary alias.,
Jonas Bernoulli <=
- bug#42397: [PATCH 05/14] Split EasyPG libraries into outline sections, Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 07/14] * lisp/progmodes/compile.el: Remove unnecessary comments., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 08/14] ; * lisp/whitespace.el: Capitalize "Code" section heading., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 09/14] * lisp/mail/smtpmail.el: Use outline headings., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 10/14] * test/src/emacs-module-tests.el: Use proper outline headings., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 11/14] * lisp/obsolete/longlines.el: Use proper outline headings., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 12/14] * lisp/net/imap.el: Use proper outline headings, Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 13/14] * lisp/font-lock.el: Split the Commentary into subsections., Jonas Bernoulli, 2020/07/16
- bug#42397: [PATCH 14/14] * lisp/font-lock.el: No longer mark each end of a section explicitly., Jonas Bernoulli, 2020/07/16