[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Elib provides a number of functions for reading data from the minibuffer. To use them in your own elisp programs, put the following line into you source file:
(require 'read) |
The following functions are provided by `read'.
(read-number &optional prompt default)
Read a number from the minibuffer. If optional argument prompt is
non-nil
, the user is prompted using prompt, otherwise the
prompt string Enter a number:
is used. If optional argument
default is non-nil
, it is written within parenthesis after
the prompt string. default can be either a number or of the type which
(interactive "P")
generates.
(read-num-range low high &optional prompt show-range)
Read a number from the minibuffer. The number returned will be forced
to lie between low and high. If prompt is
non-nil
, the user is prompted using prompt, otherwise the
prompt string Enter a number:
is used. If show-range is
non-nil
, the prompt will show the range within parenthesis to the
user.
(read-silent prompt &optional showchar)
Read a string in the minibuffer without echoing. The following characters are special when entering the string:
Delete the last character in the input buffer.
Clear the input buffer.
End the reading of the string.
Same as RET.
If optional argument showchar is non-nil
, one of these characters
will be displayed for each character input by the user.
This function is well suited to read a password from the user, but
beware of the function (view-lossage)
which displays the last 100
keystrokes, even hidden ones.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Build Daemon user on July, 13 2006 using texi2html 1.76.