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

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

Re: user-input ?


From: Greg Rowe
Subject: Re: user-input ?
Date: Fri, 03 Jun 2005 12:57:50 -0400
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Mads Jensen wrote:

I am a elisp newbie, who is trying to write a basic major mode. For
this, I need to read some input from the user, but I was not able to
find anything about that, in the elisp manual. Can anyone please tell me
how? Thank you.

Check out the help for 'interactive'. This is a link to the relevant section in the elisp manual:

http://www.gnu.org/software/emacs/elisp-manual/html_mono/elisp.html#SEC288

A very basic example of a function that requests user input in the form of a string:

(defun my-example (arg)
        "Example of getting user input"
        (interactive "sEnter a string: ")
        (insert arg))

Greg

--
Home is where the .bashrc is.


reply via email to

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