From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Liu Fung Sin" Newsgroups: gmane.emacs.help Subject: Can one define global-set-key to override mode-based keymap? Date: 12 Nov 2006 18:19:11 -0800 Organization: http://groups.google.com Message-ID: <1163384351.738042.95660@e3g2000cwe.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1163385670 21018 80.91.229.2 (13 Nov 2006 02:41:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2006 02:41:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 13 03:40:53 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GjRkP-0001JH-BU for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Nov 2006 03:40:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjRkO-0000rs-PG for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Nov 2006 21:40:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e3g2000cwe.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 71.141.243.84 Original-X-Trace: posting.google.com 1163384357 13228 127.0.0.1 (13 Nov 2006 02:19:17 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 13 Nov 2006 02:19:17 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e3g2000cwe.googlegroups.com; posting-host=71.141.243.84; posting-account=6ljFywwAAAA-OjOqlGqGkIKh1Slb1yIE Original-Xref: shelby.stanford.edu gnu.emacs.help:143054 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38672 Archived-At: Hi, I like using the arrow keys to move around so I can free up Ctrl-F Ctrl-B Ctrl-N and Ctrl-P and rebind them for some commands that I use often. For instance, I have (global-set-key "\C-n" 'other-window) in my .emacs This works great until I invoke another major mode. Like in dired, the dired mode map has C-n bound to dired-next-line. C-n runs the command dired-next-line which is an interactive compiled Lisp function in `dired'. (dired-next-line ARG) Is there a way to define a key as special using global-set-key (or otherwise) so that no other modes can override my .emacs setting? Thanks. -- fungsin