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

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

Re: Overriding emacs key bindings


From: Eli Zaretskii
Subject: Re: Overriding emacs key bindings
Date: Mon, 16 May 2016 21:04:18 +0300

> From: xiongtk <xiongtk@gmail.com>
> Date: Fri, 13 May 2016 16:20:58 +0200
> 
> 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.

Correct.  It just adds another binding.

> Any suggestions?

You want global-unset-key, evidently.



reply via email to

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