[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41276: [PATCH v2 7/8] epa-key-list-mode-map: Use widget-keymap as pa
From: |
Jonas Bernoulli |
Subject: |
bug#41276: [PATCH v2 7/8] epa-key-list-mode-map: Use widget-keymap as parent keymap |
Date: |
Tue, 7 Jul 2020 17:47:38 +0200 |
Normally when one keymap is to be treated as the parent of another,
then that relationship is setup once at the time when the child is
being defined, i.e. at birth. For some reason, this was not done
here; instead `widget-keymap' is set as `epa-key-list-mode-map'
parent every time the former is setup to be used as the local map.
This appears to be a mistake. A few other keymaps use `widget-keymap'
as their parent and in those cases the relationship is established
just once. `epa-key-list-mode-map' is the only exception and because
there is absolutely no indication that that is justified, we remove
this inconsistency.
* lisp/epa.el (epa-key-list-mode-map): Set the parent of this keymap
while defining it.
* lisp/epa.el (epa--list-keys): Do not set the parent of the local
keymap here.
---
lisp/epa.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/epa.el b/lisp/epa.el
index e4d1e5b414..8f45c667b9 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -188,6 +188,7 @@ epa-last-coding-system-specified
(defvar epa-key-list-mode-map
(let ((keymap (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
+ (set-keymap-parent keymap widget-keymap)
(define-key keymap "m" 'epa-mark-key)
(define-key keymap "u" 'epa-unmark-key)
(define-key keymap "d" 'epa-decrypt-file)
@@ -399,8 +400,7 @@ epa--list-keys
(goto-char point))
(epa--insert-keys (epg-list-keys context name secret))
- (widget-setup)
- (set-keymap-parent (current-local-map) widget-keymap))
+ (widget-setup))
(make-local-variable 'epa-list-keys-arguments)
(setq epa-list-keys-arguments (list name secret))
(goto-char (point-min))
--
2.26.0
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 1/8] * lisp/epa.el (epa-faces): Move definition., Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 2/8] Add all epa faces to epa-faces Custom group, Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 3/8] * lisp/epg-config.el (epg-config--make-gpg-configuration): Fix indentation., Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 4/8] Improve and add doc-strings, Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 5/8] Drop unnecessary backward compatibility aliases, Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 6/8] Cosmetic changes to epa libraries, Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 7/8] epa-key-list-mode-map: Use widget-keymap as parent keymap,
Jonas Bernoulli <=
- bug#41276: [PATCH v2 8/8] * lisp/epa.el (epa-show-key): New command., Jonas Bernoulli, 2020/07/07
bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Eli Zaretskii, 2020/07/07
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Jonas Bernoulli, 2020/07/07
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Eli Zaretskii, 2020/07/07
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Jonas Bernoulli, 2020/07/08
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Jonas Bernoulli, 2020/07/14
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Eli Zaretskii, 2020/07/14
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Jonas Bernoulli, 2020/07/14
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Eli Zaretskii, 2020/07/14
- bug#41276: [PATCH v2 0/8] Various small improvements to EasyPG, Jonas Bernoulli, 2020/07/14