help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global-set-key with parameter


From: harven
Subject: Re: global-set-key with parameter
Date: Thu, 09 Oct 2008 16:11:20 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

Fred Picher <frederificc@yahoo.ca> writes:

> --- On Thu, 10/9/08, Barry Margolin <barmar@alum.mit.edu> wrote:
>
>> From: Barry Margolin <barmar@alum.mit.edu>
>> 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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]