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

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

Re: binding a key to a function with an argument


From: Wang Lei
Subject: Re: binding a key to a function with an argument
Date: Thu, 23 Jul 2009 13:54:56 +0800

how about use lambda ?

(global-set-key (kbd "C-x s") '(lambda()
                                (interactive)
                                (save-some-buffers t)))


On 7/23/09, John Withers <grayarea@reddagger.org> wrote:
> Folks,
>
> I am trying to change C-x C-s save-buffer to save-some-buffers with the
> non-nil argument so that it will save all without questions.
>
> I have no problem with the bind of the save-some-buffers:
>
> (global-set-key (kbd "C-x C-s") 'save--some-buffers)
>
> but I can't figure out how to pass the non-nil argument. I have tried a
> few different ways and they all throw errors.
>
> Any help would be appreciated.
>
> -john
>
>
>
>


-- 
Regards
Lei




reply via email to

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