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: Drew Adams
Subject: RE: Possible to access previous arg in `interactice' call?
Date: Sat, 2 Aug 2014 09:29:51 -0700 (PDT)

>    (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))))



reply via email to

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