[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding emacs key bindings
From: |
xiongtk |
Subject: |
Re: Overriding emacs key bindings |
Date: |
Mon, 16 May 2016 23:15:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
Eli Zaretskii <eliz@gnu.org> writes:
>> 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.
Thanks for your advice!
- Overriding emacs key bindings, xiongtk, 2016/05/16
- Re: Overriding emacs key bindings, Eli Zaretskii, 2016/05/16
- Re: Overriding emacs key bindings,
xiongtk <=
- Re: Overriding emacs key bindings, Emanuel Berg, 2016/05/16
- Re: Overriding emacs key bindings, xiongtk, 2016/05/16
- Re: Overriding emacs key bindings, Kaushal Modi, 2016/05/16
- RE: Overriding emacs key bindings, Drew Adams, 2016/05/17
- Re: Overriding emacs key bindings, Emanuel Berg, 2016/05/17
- Re: Overriding emacs key bindings, Robert Thorpe, 2016/05/17