From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eduard Wiebe Newsgroups: gmane.emacs.help Subject: Re: Binding f2 u Date: Tue, 09 Feb 2010 22:02:49 +0100 Message-ID: <86y6j2xgue.fsf@nirvana.pusto.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265751711 27708 80.91.229.12 (9 Feb 2010 21:41:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2010 21:41:51 +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 Feb 09 22:41:49 2010 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.69) (envelope-from ) id 1Nexq8-0005Eh-F5 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Feb 2010 22:41:48 +0100 Original-Received: from localhost ([127.0.0.1]:37666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nexq7-0001l0-VS for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Feb 2010 16:41:47 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: news.uni-berlin.de 56RdFMPIT5T19h4QjdrALAZdGu2/a0qt88aWB2nNLjTPfTMn8= Cancel-Lock: sha1:Pl6d0U221Nqu8f7cfspuoT+mu40= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) Original-Xref: news.stanford.edu gnu.emacs.help:176700 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:71771 Archived-At: Steve Wainstead writes: Hi, > I'm trying to bind "f2 u" to a custom function. After spelunking the > *Help* and googling, it seems F2 is the prefix key for the sparse > keymap "2C-command," or else "2c-mode-map." > > By default, when one starts emacs -q -nw, f2-s starts two column mode; > so something must live in the global map? Because I cannot bind > anything to either 2C-command or 2c-mode-map: > > (define-key 2C-command "u" 'sw-update-builds) > or > (define-key 2c-mode-map "u" 'sw-update-builds) > > These fail because 2C-command and 2c-mode-map are void, while: > > (define-key ctl-x-map "9" 'sw-update-builds) > > does work. How can I bind to f2-u without wiping out the existing mode > map, which seems to be undefined even after I load 2 column mode? I'll > wind up just creating my own sparse keymap for f2 otherwise. How about this: (global-set-key (kbd " u") (lambda () (interactive) (message "YES"))) -- Eduard Wiebe