From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xiongtk Newsgroups: gmane.emacs.help Subject: Overriding emacs key bindings Date: Fri, 13 May 2016 16:20:58 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1463421207 6903 80.91.229.3 (16 May 2016 17:53:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 17:53: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 19:53:19 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 1b2Mhg-0007yk-3g for geh-help-gnu-emacs@m.gmane.org; Mon, 16 May 2016 19:53:16 +0200 Original-Received: from localhost ([::1]:45634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Mhf-0002Wl-Im for geh-help-gnu-emacs@m.gmane.org; Mon, 16 May 2016 13:53:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Mda-0001dL-0c for help-gnu-emacs@gnu.org; Mon, 16 May 2016 13:49:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MdW-0007fr-5q for help-gnu-emacs@gnu.org; Mon, 16 May 2016 13:49:00 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MdV-0007fP-TT for help-gnu-emacs@gnu.org; Mon, 16 May 2016 13:48:58 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b1E6O-0000nT-4I for help-gnu-emacs@gnu.org; Fri, 13 May 2016 16:30:04 +0200 Original-Received: from unused-137-206.via.ecp.fr ([138.195.137.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2016 16:30:04 +0200 Original-Received: from xiongtk by unused-137-206.via.ecp.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2016 16:30:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: unused-137-206.via.ecp.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:FOvCOYTdDn0bw/BQ1HBSsKT8W20= 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:109990 Archived-At: 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. 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.