From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Possible to access previous arg in `interactice' call? Date: Sat, 2 Aug 2014 09:29:51 -0700 (PDT) Message-ID: <61fe3fcb-0762-4f7a-910a-d80b67ab072b@default> References: <8738dff5os.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1406997032 846 80.91.229.3 (2 Aug 2014 16:30:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2014 16:30:32 +0000 (UTC) To: Thorsten Jolitz , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 02 18:30:24 2014 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 1XDcCL-0003f0-QZ for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Aug 2014 18:30:21 +0200 Original-Received: from localhost ([::1]:45264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDcCL-00064i-EB for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Aug 2014 12:30:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDcC3-000603-Jm for help-gnu-emacs@gnu.org; Sat, 02 Aug 2014 12:30:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDcBu-0007zo-U9 for help-gnu-emacs@gnu.org; Sat, 02 Aug 2014 12:30:03 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:26555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDcBu-0007zN-NJ for help-gnu-emacs@gnu.org; Sat, 02 Aug 2014 12:29:54 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s72GTpNx022103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 2 Aug 2014 16:29:52 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s72GToEp003959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 2 Aug 2014 16:29:51 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s72GTosG016878; Sat, 2 Aug 2014 16:29:50 GMT In-Reply-To: <8738dff5os.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:99056 Archived-At: > (interactive (list (read-number "Num1: ") > (+ (read-number "Num2: ") num1))) >=20 > -> list: Symbol's value as variable is void: num1 Bind the value returned by the first `read-number' to a local variable, and use that. (interactive (let ((n1 (read-number "Num1: "))) (list n1 (+ (read-number "Num2: ") n1))))