From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xiongtk Newsgroups: gmane.emacs.help Subject: Re: Overriding emacs key bindings Date: Mon, 16 May 2016 23:15:39 +0200 Message-ID: References: <83posl517h.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1463433633 17412 80.91.229.3 (16 May 2016 21:20:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 21:20:33 +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 23:20:25 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 1b2Pw5-0006tz-S7 for geh-help-gnu-emacs@m.gmane.org; Mon, 16 May 2016 23:20:22 +0200 Original-Received: from localhost ([::1]:47456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Pw5-00054E-2h for geh-help-gnu-emacs@m.gmane.org; Mon, 16 May 2016 17:20:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Pvt-0004ye-8X for help-gnu-emacs@gnu.org; Mon, 16 May 2016 17:20:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2Pvq-0004Kl-Fc for help-gnu-emacs@gnu.org; Mon, 16 May 2016 17:20:09 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Pvq-0004KA-9f for help-gnu-emacs@gnu.org; Mon, 16 May 2016 17:20:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b2Pvn-0006lt-J4 for help-gnu-emacs@gnu.org; Mon, 16 May 2016 23:20:03 +0200 Original-Received: from 2015xiongt4.via.ecp.fr ([138.195.144.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2016 23:20:03 +0200 Original-Received: from xiongtk by 2015xiongt4.via.ecp.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2016 23:20:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 2015xiongt4.via.ecp.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:V8QvP+v7EotZpEVTVlvgpFJE5fY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:110001 Archived-At: Eli Zaretskii writes: >> 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. Thanks for your advice!