From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.help Subject: Re: How do you use a number as an argument to global-set-key? Date: Tue, 21 Apr 2009 15:13:16 +0900 Organization: NEC Electronics Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1240296065 13806 80.91.229.12 (21 Apr 2009 06:41:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2009 06:41:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 21 08:42:25 2009 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 1Lw9gX-0005sx-6z for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Apr 2009 08:42:25 +0200 Original-Received: from localhost ([127.0.0.1]:53466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lw9f8-00047a-At for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Apr 2009 02:40:58 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-X-Trace: individual.net sfPDSuCUsAcRnulHFUJgqQvaM1BfHbvLP30Fp/Hv86Z+xWBmZI Cancel-Lock: sha1:Je5qGgL9BiEabzzhZsvjzJ6IulA= sha1:JRSWRP2WROYWYxpZCzEMUWl70HQ= System-Type: x86_64-unknown-linux-gnu Blat: Foop Original-Xref: news.stanford.edu gnu.emacs.help:168643 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:63916 Archived-At: formido writes: > I want to use the numbers above the keyboard in 'global-set-key', > e.g., have a command trigger with C-2. "\C-2" doesn't work. What does? Use a vector instead of a string (strings can only contain a limited subset of keys). E.g.: (global-set-key [?\C-2] 'foo) -Miles -- Quotation, n. The act of repeating erroneously the words of another. The words erroneously repeated.