The key binding \ of the function w3m-show-source
interferes with the function with the same key binding hydra-master-body
(which I set up in the init
file). I have used the function global-set-key
to change the key binding of w3m-show-source
to ctrl-,. Now the function w3m-show-source
has two key bindings \ and ctrl-,. How can I remove \ from the function w3m-show-source
so that it will execute hydra-master-body
?
Asked
Active
Viewed 62 times
0

Drew
- 75,699
- 9
- 109
- 225

Enrico Pirani
- 367
- 2
- 10
-
Does this answer your question? [Unbind C-RET in emacs?](https://emacs.stackexchange.com/questions/14500/unbind-c-ret-in-emacs) – Drew Jan 11 '21 at 00:03
-
in which way should this solve the problem? I tried `(define-key w3m-view-source [\\] nil) ` unsuccessfully. – Enrico Pirani Jan 11 '21 at 11:53
-
Please include all relevant information in the question itself. Comments can be deleted at any time. Thx. – Drew Jan 11 '21 at 19:02
-
Your `define-key` in your comment is missing a KEYMAP arg. And `[\\]` is not what you want. Did you try `(global-set-key (kbd "\\") nil)`? Or did you try `(global-unset-key (kbd "\\"))`? Your question is unclear/incomplete. We can't answer the question until we know what you're asking and what you've tried. – Drew Jan 11 '21 at 19:05
-
`(global-set-key (kbd "\\") nil)` and `(global-unset-key (kbd "\\"))` are not working simply because [Unbind C-RET in emacs?](https://emacs.stackexchange.com/questions/14500/unbind-c-ret-in-emacs) is unrelated to the problem. The `"\\"` in `w3m` is interfering with my main hydra command. When I am in w3m and want to call hydra, I get the source of the web page instead. I don't want that, – Enrico Pirani Jan 12 '21 at 23:31
1 Answers
1
Find out the solution. The command was (add-hook 'w3m-mode-hook (lambda () (define-key w3m-mode-map (kbd "\\") nil)))

Enrico Pirani
- 367
- 2
- 10