From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: global-set-key with parameter Date: Thu, 09 Oct 2008 16:11:20 +0200 Organization: gnu emacs 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 1223563392 10849 80.91.229.12 (9 Oct 2008 14:43:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2008 14:43:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 16:44:08 2008 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 1KnwjN-0006Ns-Uy for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 16:43:10 +0200 Original-Received: from localhost ([127.0.0.1]:45940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnwiJ-0000yD-DK for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 10:42:03 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp13-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Cancel-Lock: sha1:RLJnjhXgaujKKj3QRasLAJ04RD4= Original-Lines: 32 Original-NNTP-Posting-Date: 09 Oct 2008 16:11:20 MEST Original-NNTP-Posting-Host: 82.240.200.149 Original-X-Trace: 1223561480 news-4.free.fr 17491 82.240.200.149:50313 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:163276 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:58619 Archived-At: Fred Picher writes: > --- On Thu, 10/9/08, Barry Margolin wrote: > >> From: Barry Margolin >> Subject: Re: global-set-key with parameter >> To: help-gnu-emacs@gnu.org >> Received: Thursday, October 9, 2008, 6:40 AM > > Hello, > >> You need to write a new Elisp function that calls >> window-configuration-to-register with the parameter, and bind >> the key to THAT function. > >> (defun window-config-to-register-w () >> "Store the window configuration in register 'w'." >> (interactive) >> (window-configuration-to-register ?w)) > >> >(global-set-key [f5] 'window-configuration-to-register-w) > Thanks for the help. That sounds quite straightforward > although I do not know any lisp. For this reason I'm a bit lost > when I get the following error message after pressing F5: > > Symbol's function definition is void: window-configuration-to-register-w This is a typo. The command to be bound to f5 is called window-config-to-register-w. So, use (global-set-key [f5] 'window-config-to-register-w)