diff options
Diffstat (limited to 'lispref/os.texi')
-rw-r--r-- | lispref/os.texi | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/lispref/os.texi b/lispref/os.texi index b3764422dff..f9b6595f71c 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -19,6 +19,7 @@ pertaining to the terminal and the screen. * Getting Out:: How exiting works (permanent or temporary). * System Environment:: Distinguish the name and kind of system. * User Identification:: Finding the name and user id of the user. +* Reading a Password:: Reading a password from the terminal. * Time of Day:: Getting the current time. * Time Conversion:: Converting a time from numeric form to a string, or to calendrical data (or vice versa). @@ -195,6 +196,7 @@ loading of this file with the option @samp{-no-site-file}. @defvar site-run-file This variable specifies the site-customization file to load before the user's init file. Its normal value is @code{"site-start"}. +(The only way to change it with real effect is before dumping Emacs.) @end defvar If there is a great deal of code in your @file{.emacs} file, you @@ -214,12 +216,13 @@ then the default library is not loaded. The default value is @end defopt @defvar before-init-hook -This normal hook is run, once, just before loading of all the init files +This normal hook is run, once, just before loading all the init files (the user's init file, @file{default.el}, and/or @file{site-start.el}). +(The only way to change it with real effect is before dumping Emacs.) @end defvar @defvar after-init-hook -This normal hook is run, once, just after loading of all the init files +This normal hook is run, once, just after loading all the init files (the user's init file, @file{default.el}, and/or @file{site-start.el}), before the terminal-specific initialization. @end defvar @@ -568,6 +571,9 @@ The value of this variable is a symbol indicating the type of operating system Emacs is operating on. Here is a table of the possible values: @table @code +@item alpha-vms +VMS on the Alpha. + @item aix-v3 AIX. @@ -727,13 +733,13 @@ containing the Emacs executable. @end defvar @defun load-average &optional use-float -This function returns the current 1-minute, 5-minute and 15-minute load -averages in a list. +This function returns the current 1-minute, 5-minute, and 15-minute load +averages, in a list. By default, the values are integers that are 100 times the system load averages, which indicate the average number of processes trying to run. If @var{use-float} is non-@code{nil}, then they are returned -as floating point numbers instead. +as floating point numbers and without multiplying by 100. @example @group @@ -864,6 +870,29 @@ This function returns the real @sc{uid} of the user. This function returns the effective @sc{uid} of the user. @end defun +@node Reading a Password +@section Reading a Password +@cindex passwords, reading + + To read a password to pass to another program, you can use the +function @code{read-passwd}. + +@tindex read-passwd +@defun read-passwd prompt &optional confirm default +This function reads a password, prompting with @var{prompt}. It does +not echo the password as the user types it; instead, it echoes @samp{.} +for each character in the password. + +The optional argument @var{confirm}, if non-@code{nil}, says to read the +password twice and insist it must be the same both times. If it isn't +the same, the user has to type it over and over until the last two +times match. + +The optional argument @var{default} specifies the default password to +return if the user enters empty input. If @var{default} is @code{nil}, +then @code{read-passwd} returns the null string in that case. +@end defun + @node Time of Day @section Time of Day @@ -1129,7 +1158,7 @@ after a certain length of idleness. Emacs cannot run timers at any arbitrary point in a Lisp program; it can run them only when Emacs could accept output from a subprocess: namely, while waiting or inside certain primitive functions such as -@code{sit-for} or @code{read-char} which @emph{can} wait. Therefore, a +@code{sit-for} or @code{read-event} which @emph{can} wait. Therefore, a timer's execution may be delayed if Emacs is busy. However, the time of execution is very precise if Emacs is idle. @@ -1139,8 +1168,9 @@ at time @var{time}. The argument @var{function} is a function to call later, and @var{args} are the arguments to give it when it is called. The time @var{time} is specified as a string. -Absolute times may be specified in a wide variety of formats, and tries -to accept all common date formats. Valid formats include these two, +Absolute times may be specified in a wide variety of formats; this +function tries to accept all the commonly used date formats. Valid +formats include these two, @example @var{year}-@var{month}-@var{day} @var{hour}:@var{min}:@var{sec} @var{timezone} @@ -1664,7 +1694,7 @@ It is not crucial to exclude from the alist the keysyms of other X servers; those do no harm, as long as they don't conflict with the ones used by the X server actually in use. -The variable is always local to the current X terminal and cannot be +The variable is always local to the current terminal, and cannot be buffer-local. @xref{Multiple Displays}. @end defvar @@ -1684,7 +1714,7 @@ entries and DEC terminal concentrators, see @file{emacs/etc/TERMS}. @code{C-s} and @kbd{C-q} for flow control. Therefore, the choice of @kbd{C-s} and @kbd{C-q} as command characters for searching and quoting was natural and uncontroversial. With so many commands needing key -assignments. of course we assigned meanings to nearly all @sc{ASCII} +assignments, of course we assigned meanings to nearly all @sc{ASCII} control characters. Later, some terminals were introduced which required these characters |