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

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

Re: Possible to access previous arg in `interactice' call?


From: Thorsten Jolitz
Subject: Re: Possible to access previous arg in `interactice' call?
Date: Sat, 02 Aug 2014 19:36:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

>>    (interactive (list (read-number "Num1: ")
>>                       (+ (read-number "Num2: ") num1)))
>> 
>> -> 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))))

That works, thanks!

-- 
cheers,
Thorsten




reply via email to

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