[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible to access previous arg in `interactice' call?
From: |
Thorsten Jolitz |
Subject: |
Possible to access previous arg in `interactice' call? |
Date: |
Sat, 02 Aug 2014 14:15:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hi List,
in this example, is there a way to access num1 while reading num2?
#+begin_src emacs-lisp
(defun foo (num1 num2)
(interactive
(list
(read-number "Num1: ")
(+ (read-number "Num2: ") num1)))
(message "num1: %s\nnum2: %s" num1 num2))
#+end_src
#+results:
: foo
#+begin_src emacs-lisp
(call-interactively 'foo)
#+end_src
-> list: Symbol's value as variable is void: num1
--
cheers,
Thorsten
- Possible to access previous arg in `interactice' call?,
Thorsten Jolitz <=