all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Possible to access previous arg in `interactice' call?
@ 2014-08-02 12:15 Thorsten Jolitz
  2014-08-02 16:29 ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Jolitz @ 2014-08-02 12:15 UTC (permalink / raw)
  To: help-gnu-emacs


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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-02 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-02 12:15 Possible to access previous arg in `interactice' call? Thorsten Jolitz
2014-08-02 16:29 ` Drew Adams
2014-08-02 17:36   ` Thorsten Jolitz
     [not found]   ` <mailman.6474.1407001032.1147.help-gnu-emacs@gnu.org>
2014-08-02 20:57     ` Pascal J. Bourguignon

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.