gildea@BBN.COM (Stephen Gildea) (09/15/89)
Some of the functions in lisp.el -- forward-sexp, backward-sexp, forward-list, and backward-list -- specify "(interactive "p")" but then do "(or arg (setq arg 1))", which isn't necessary. < Stephen
jbw@bucsf.bu.edu (Joe Wells) (09/15/89)
In article <8909150058.AA09492@life.ai.mit.edu> gildea@BBN.COM (Stephen Gildea) writes:
Some of the functions in lisp.el -- forward-sexp, backward-sexp,
forward-list, and backward-list -- specify "(interactive "p")" but then
do "(or arg (setq arg 1))", which isn't necessary.
This allows these functions to be used from Lisp code like this:
(forward-sexp)
as shorthand for this:
(forward-sexp 1)
The arguments of these functions are declared using the &optional keyword,
which directs lisp to fill in the parameters with nil, if arguments are
not supplied.
--
Joe Wells <jbw@bucsf.bu.edu>
jbw%bucsf.bu.edu@bu-it.bu.edu
...!harvard!bu-cs!bucsf!jbw