* bug#27828: 25.2; dired-x-hands-off-my-keys unsets remap find-file
@ 2017-07-25 18:52 Allen Li
2017-07-26 19:07 ` bug#27828: [PATCH] Do not unset user key remaps in dired-x Allen Li
0 siblings, 1 reply; 3+ messages in thread
From: Allen Li @ 2017-07-25 18:52 UTC (permalink / raw
To: 27828
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
The user option `dired-x-hands-off-my-keys' implies that dired-x won't
touch the users key bindings, but it will actually set [remap find-file]
regardless.
If I set [remap find-file] personally, `dired-x' will unset it, which
contradicts the meaning of "hands off my keys" in English.
In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8), modified by
Debian
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description: Ubuntu 14.04 LTS
[-- Attachment #2: Type: text/html, Size: 695 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#27828: [PATCH] Do not unset user key remaps in dired-x
2017-07-25 18:52 bug#27828: 25.2; dired-x-hands-off-my-keys unsets remap find-file Allen Li
@ 2017-07-26 19:07 ` Allen Li
2017-07-29 9:02 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Allen Li @ 2017-07-26 19:07 UTC (permalink / raw
To: 27828
* lisp/dired-x.el (dired-x-bind-find-file): Don't map any keys if user
sets dired-x-hands-off-my-keys.
---
lisp/dired-x.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 915550991d..1425278bdc 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1629,10 +1629,11 @@ Binding direction based on `dired-x-hands-off-my-keys'."
(if (called-interactively-p 'interactive)
(setq dired-x-hands-off-my-keys
(not (y-or-n-p "Bind dired-x-find-file over find-file? "))))
- (define-key (current-global-map) [remap find-file]
- (if (not dired-x-hands-off-my-keys) 'dired-x-find-file))
- (define-key (current-global-map) [remap find-file-other-window]
- (if (not dired-x-hands-off-my-keys) 'dired-x-find-file-other-window)))
+ (unless dired-x-hands-off-my-keys
+ (define-key (current-global-map) [remap find-file]
+ 'dired-x-find-file)
+ (define-key (current-global-map) [remap find-file-other-window]
+ 'dired-x-find-file-other-window)))
;; Now call it so binding is correct. This could go in the :initialize
;; slot, but then dired-x-bind-find-file has to be defined before the
--
2.14.0.rc0.400.g1c36432dff-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#27828: [PATCH] Do not unset user key remaps in dired-x
2017-07-26 19:07 ` bug#27828: [PATCH] Do not unset user key remaps in dired-x Allen Li
@ 2017-07-29 9:02 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2017-07-29 9:02 UTC (permalink / raw
To: Allen Li; +Cc: 27828-done
> From: Allen Li <vianchielfaura@gmail.com>
> Date: Wed, 26 Jul 2017 12:07:34 -0700
>
> * lisp/dired-x.el (dired-x-bind-find-file): Don't map any keys if user
> sets dired-x-hands-off-my-keys.
Thanks, pushed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-29 9:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 18:52 bug#27828: 25.2; dired-x-hands-off-my-keys unsets remap find-file Allen Li
2017-07-26 19:07 ` bug#27828: [PATCH] Do not unset user key remaps in dired-x Allen Li
2017-07-29 9:02 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.