From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: global-set-key with parameter Date: Thu, 09 Oct 2008 02:40:51 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1223538064 22639 80.91.229.12 (9 Oct 2008 07:41:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2008 07:41:04 +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 09:41:52 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 1Knq9X-0007Sd-SZ for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 09:41:44 +0200 Original-Received: from localhost ([127.0.0.1]:42856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knq8T-0006bM-P1 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 03:40:37 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.motzarella.org!motzarella.org!barmar Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-X-Trace: feeder.motzarella.org U2FsdGVkX19iTuTGfCG8xZE9CaJvSkApIzDgrBTIkOeWVX2x2Go3cdZp3SyFi5i5iu/EZ9gxukumyYqSKE44KDX6VStzZLC6zAHO3V5XwXAMCgziFo3ZDnJhtkFZXrggTI53uhJEb7w= Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Thu, 9 Oct 2008 06:40:51 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19qz8u5Wy84UQ2FG8YZ1QbIH6SWuChqnYw= Cancel-Lock: sha1:GjyeFn+oUAh5yB6qO5hUsbFCGeU= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:163261 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:58605 Archived-At: In article , Fred Picher wrote: > Hello all, > > I would like to bind the following function and parameter to the F5 > key in emacs 23, which is currently undefined. This is to save the > buffer layout to be recalled using the lowercase 'w' key: > > C-x r w w > > That would be the window-configuration-to-register command I > think. I could do something like: > > (global-set-key [f5] 'window-configuration-to-register) > > But how is the 'w' parameter passed to this command ? 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) -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***