help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overriding emacs key bindings


From: xiongtk
Subject: Overriding emacs key bindings
Date: Fri, 13 May 2016 16:20:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

Hi! I'm in a situation where I would like to override the following key
binding:

    
/Applications/Emacs.app/Contents/Resources/lisp/international/mule-cmds.el.gz

    (define-key global-map "\C-\\" 'toggle-input-method)


Since this file is read only and it's not inside .emacs.d, I do not
want to change it directly if other solutions are possible.

I've tried with writing the following line in my personal customization
file:

    (define-key global-map (kbd "<f8>") 'toggle-input-method)
or
    (global-set-key (kbd "<f8>")  'toggle-input-method)

(I've tried both.)
Which assigns f8 to be the key binding.

However, checking the key binding with C-h a toggle-input-method gives me
the following message:

    Type M-x apropos-follow on an entry to view its full documentation.

    isearch-toggle-input-method   M-x ... RET
    Toggle input method in interactive search.
    toggle-input-method           <menu-bar> <options> <mule> 
<toggle-input-method>, <f8>, C-\
    :around advice: `ad-Advice-toggle-input-method'


Apparently my method does not override the original key binding. Any
suggestions?

P.S. About why I want to do that, I use evil-leader which uses "\" as
the leader key. To execute evil-leader key bindings in non normal mode of
evil-mode, I need to use C-\ as the leader key. So it conflicts with
the default key binding for toggle-input-method.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]