From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: weber Newsgroups: gmane.emacs.help Subject: Re: Problem binding to a key Date: 20 Apr 2007 08:54:49 -0700 Organization: http://groups.google.com Message-ID: <1177084488.965651.231230@n59g2000hsh.googlegroups.com> References: <4628d418$0$325$e4fe514c@news.xs4all.nl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1177086957 15838 80.91.229.12 (20 Apr 2007 16:35:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2007 16:35:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 20 18:35:51 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hew5N-0001qJ-Rs for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 18:35:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HewAS-0004Om-Bz for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 12:41:04 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!out02b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!n59g2000hsh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: 201.21.223.137 Original-X-Trace: posting.google.com 1177084489 4463 127.0.0.1 (20 Apr 2007 15:54:49 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 20 Apr 2007 15:54:49 +0000 (UTC) In-Reply-To: <4628d418$0$325$e4fe514c@news.xs4all.nl> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 fw.datacom-telematica.com.br:3128 (squid/2.5.STABLE6) Complaints-To: groups-abuse@google.com Injection-Info: n59g2000hsh.googlegroups.com; posting-host=201.21.223.137; posting-account=pG57fA0AAADtQ-4h1MyvjXjZpSNZC0zj Original-Xref: shelby.stanford.edu gnu.emacs.help:147300 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:42906 Archived-At: On 20 abr, 11:54, Cecil Westerhof wrote: > I have the following two lines in my .emacs: > (define-key global-map "\C-cw" 'clipboard-kill-ring-save) > (define-key global-map "\C-x\C-kw" 'clipboard-kill-ring-save) > > The first line is no problem, the second gives: > error: "Key sequence C-x C-k w uses invalid prefix characters" > > What I understood from 'Learning GNU Emacs' is the second way, the way you > should bind your own definitions. Why does it not work? Because C-k already has another definition (killing text) You have to "undefine" C-k with something like this: (global-set-key "\C-k" nil) Hope it helps, weber