From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: binding a key to a function with an argument Date: Thu, 23 Jul 2009 13:54:56 +0800 Message-ID: References: <1248279221.8457.46.camel@firefly> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248328558 18937 80.91.229.12 (23 Jul 2009 05:55:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jul 2009 05:55:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: grayarea@reddagger.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 23 07:55:50 2009 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 1MTrHP-0007kg-Qx for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2009 07:55:49 +0200 Original-Received: from localhost ([127.0.0.1]:46136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTrHM-0005nG-A3 for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2009 01:55:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTrGl-0005lQ-Gq for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 01:55:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTrGg-0005hg-9y for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 01:55:06 -0400 Original-Received: from [199.232.76.173] (port=53409 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTrGg-0005hd-3v for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 01:55:02 -0400 Original-Received: from mail-qy0-f183.google.com ([209.85.221.183]:32821) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTrGf-000145-Au for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 01:55:01 -0400 Original-Received: by qyk13 with SMTP id 13so980201qyk.14 for ; Wed, 22 Jul 2009 22:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GkFsNJOIIQJLLxuBEXz6UiSWGualN71iiYXahAE6HRw=; b=aO+zfOS7D4xsi+i9QMRH2pBEetY6QH1G/UQnw/rHyTqANeHcc/jW/2xh5bAABMU3Ty a4DIZhRPxpuhyNrtIM2S+9vH77AFV3mXvlVUZUq/SEx/HWCWdkXQ6nQRPprWG8/kMprQ dgq5vSJuIPyMiVs6VJZhCZEH9HnPHOa2EV0Ro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=QJp0Dlli85zoU9mFmqKyth6oHLGQAs4WrpyE67a8VTYsnAmhrZtDNa9bGbfsJZKXwy S6mT15acb+pEYF2HrYch+zYlptbRQkxqs7X9kG4G8MOog8o3iXWjaQgWKl2t+Ydt53eQ civJIxXl1XBh4pRxbfqmU6EySRFrewxINncW4= Original-Received: by 10.220.81.69 with SMTP id w5mr1440432vck.23.1248328496653; Wed, 22 Jul 2009 22:54:56 -0700 (PDT) In-Reply-To: <1248279221.8457.46.camel@firefly> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:66347 Archived-At: how about use lambda ? (global-set-key (kbd "C-x s") '(lambda() (interactive) (save-some-buffers t))) On 7/23/09, John Withers 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