From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: Basic elisp question: bind key to function with arg Date: Sun, 25 Jan 2015 18:12:34 -0500 Message-ID: <87d262ihel.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422227574 2456 80.91.229.3 (25 Jan 2015 23:12:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2015 23:12:54 +0000 (UTC) To: emacs list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 26 00:12:53 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YFWMN-00066c-2e for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jan 2015 00:12:51 +0100 Original-Received: from localhost ([::1]:39267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFWMM-0004XI-9R for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2015 18:12:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFWMA-0004X1-GM for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 18:12:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFWM9-00087j-Lj for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 18:12:38 -0500 Original-Received: from mail-yk0-x22d.google.com ([2607:f8b0:4002:c07::22d]:49688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFWM9-00087e-Ge for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 18:12:37 -0500 Original-Received: by mail-yk0-f173.google.com with SMTP id 142so2701876ykq.4 for ; Sun, 25 Jan 2015 15:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=bLPj850CvZpy7G+/ZDQCy99OI6OmbQghcUN8Qg/Gxvg=; b=vrQoq916zFFLPW2S5c4a3uEjpeIbVlYBF5ugUfb/YLb9u8DIvUOiqzylr2GFOUVWJj RVF9fHdEecdLkvz6iSobIv8yNstoE5LjN8RNeGK1ALvfahB4Ldtb2HjqfeCWXK40m0jT mFm4xB89j5bw9/u423HRAx8H/IUA370s2Pg41FGoB3/oVYrFg19bO4leuq39ADSxd3xN sMm7fC/GnJbdqLJ0QrmB+tvUYpFLwnZphX/WctwZj+bacg4OCV0HK+jK6vg7Umz0d1pw JdyqTazlkEBJkKqqF5Cr9VkO50P/XwoiQshPYFPv2vWGVSGScMMKVrNPiXmK585AFEr+ 4X6g== X-Received: by 10.236.1.97 with SMTP id 61mr7889561yhc.78.1422227556846; Sun, 25 Jan 2015 15:12:36 -0800 (PST) Original-Received: from localhost.localdomain ([2601:0:a000:4a1:ee55:f9ff:feb5:5589]) by mx.google.com with ESMTPSA id a61sm4181788yha.13.2015.01.25.15.12.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 15:12:35 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102263 Archived-At: I have the following in my emacs init, and it works fine: (global-set-key [C-up] 'enlarge-window) (global-set-key [C-down] (lambda () (interactive) (enlarge-window -1))) But it seems awkward to me that I need to add all the extra just to pass a -1 arg to the function, so I'm suspecting there's a simpler way to write this. Any tips?