This file describes the new Lisp features of Emacs version 19 as first released to the public. For Lisp changes in subsequent Emacs 19 releases, see the file NEWS.
delete
is a traditional Lisp function. It takes
two arguments, elt and list, and deletes from list any
elements that are equal to elt. It uses the function equal
to compare elements with elt.
member
is a traditional Lisp function. It takes
two arguments, elt and list, and finds the first element of
list that is equal to elt. It uses the function
equal
to compare each list element with elt.
The value is a sublist of list, whose first element is the one
that was found. If no matching element is found, the value is
nil
.
indirect-function
finds the effective function
definition of an object called as a function. If the object is a
symbol, indirect-function
looks in the function definition of the
symbol. It keeps doing this until it finds something that is not a
symbol.
read
when reading from a buffer now does not skip a
terminator character that terminates a symbol. It leaves that character
to be read (or just skipped, if it is whitespace) next time.
read
, it is usually called with no arguments, and should return
the next character. In Emacs 19, sometimes function is called
with one argument (always a character). When that happens,
function should save the argument and arrange to return it when
called next time.
random
with integer argument n returns a random number
between 0 and n-1.
documentation
and documentation-property
now
take an additional optional argument which, if non-nil
, says to
refrain from calling substitute-command-keys
. This way, you get
the exact text of the documentation string as written, without the usual
substitutions. Make sure to call substitute-command-keys
yourself if you decide to display the string.
invocation-name
returns as a string the program
name that was used to run Emacs, with any directory names discarded.
map-y-or-n-p
makes it convenient to ask a series
of similar questions. The arguments are prompter, actor,
list, and optional help.
The value of list is a list of objects, or a function of no
arguments to return either the next object or nil
meaning there
are no more.
The argument prompter specifies how to ask each question. If
prompter is a string, the question text is computed like this:
(format prompter object)where object is the next object to ask about. If not a string, prompter should be a function of one argument (the next object to ask about) and should return the question text. The argument actor should be a function of one argument, which is called with each object that the user says yes for. Its argument is always one object from list. If help is given, it is a list
(object objects
action)
, where object is a string containing a singular
noun that describes the objects conceptually being acted on;
objects is the corresponding plural noun and action is a
transitive verb describing actor. The default is ("object"
"objects" "act on")
.
Each time a question is asked, the user may enter y, Y, or
SPC to act on that object; n, N, or DEL to skip
that object; ! to act on all following objects; ESC or
q to exit (skip all following objects); . (period) to act on
the current object and then exit; or C-h to get help.
map-y-or-n-p
returns the number of objects acted on.
setenv
command. This works by setting the variable process-environment
,
which getenv
now examines in preference to the environment Emacs
received from its parent.