From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Overriding emacs key bindings Date: Mon, 16 May 2016 21:04:18 +0300 Message-ID: <83posl517h.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1463421927 18913 80.91.229.3 (16 May 2016 18:05:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 18:05:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 16 20:05:27 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b2MtT-0005Bf-2Q for geh-help-gnu-emacs@m.gmane.org; Mon, 16 May 2016 20:05:27 +0200 Original-Received: from localhost ([::1]:45885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MtS-00020s-4G for geh-help-gnu-emacs@m.gmane.org; Mon, 16 May 2016 14:05:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Msf-0000pV-2G for help-gnu-emacs@gnu.org; Mon, 16 May 2016 14:04:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MsZ-0000QQ-L5 for help-gnu-emacs@gnu.org; Mon, 16 May 2016 14:04:35 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MsZ-0000Pr-Hk for help-gnu-emacs@gnu.org; Mon, 16 May 2016 14:04:31 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2465 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b2MsW-0002xb-Ap for help-gnu-emacs@gnu.org; Mon, 16 May 2016 14:04:30 -0400 In-reply-to: (message from xiongtk on Fri, 13 May 2016 16:20:58 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109994 Archived-At: > From: xiongtk > 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 "") 'toggle-input-method) > or > (global-set-key (kbd "") '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 , , 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.