[Top][All Lists]

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

Re: reading a variable from the user

From: Francesco Mazzoli
Subject: Re: reading a variable from the user
Date: Wed, 10 Oct 2012 10:08:34 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Wed, 10 Oct 2012 00:24:35 -0700 (PDT),
drain wrote:
> Is there a function that prompts the user in the mini-buffer, matches the
> string input with a local variable name, and then returns the variable? 

You can use something like

    (defun foo (var)
      (interactive "v")
      (message "%S" (symbol-value var)))

See the help page for `interactive' for more info.

Francesco * Often in error, never in doubt

reply via email to

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