Commit e509f168 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(For, Fand, Fprogn, un_autoload, do_autoload): Use XCDR, XCAR, CONSP.

(Fdefmacro): Fix docstring.  Use XCAR, XCDR.
(Fapply): Remove unnecessary GCPRO.
parent 8a7bde3e
2003-04-17 Stefan Monnier <monnier@cs.yale.edu>
* eval.c (For, Fand, Fprogn, un_autoload, do_autoload):
Use XCDR, XCAR, CONSP.
(Fdefmacro): Fix docstring. Use XCAR, XCDR.
(Fapply): Remove unnecessary GCPRO.
* doc.c (Fsubstitute_command_keys): Remove spurious casts.
* charset.h (PARSE_MULTIBYTE_SEQ): Pretend `length' is used.
* buffer.h: Don't hardcode BEG==1.
* abbrev.c (Fdefine_abbrev_table): Use XCAR, XCDR.
2003-04-16 Richard M. Stallman <rms@gnu.org>
* xdisp.c (try_window, try_window_reusing_current_matrix):
......@@ -5,6 +20,10 @@
* buffer.c (Foverlay_recenter): Doc fix.
2003-04-14 Stefan Monnier <monnier@cs.yale.edu>
* dispnew.c (Fsit_For): Support XEmacs-style arg list.
2003-04-14 Andrew Choi <akochoi@shaw.ca>
* macterm.c (mac_check_for_quit_char): Don't check more often than
......
......@@ -294,24 +294,18 @@ usage: (or CONDITIONS ...) */)
(args)
Lisp_Object args;
{
register Lisp_Object val;
Lisp_Object args_left;
register Lisp_Object val = Qnil;
struct gcpro gcpro1;
if (NILP(args))
return Qnil;
args_left = args;
GCPRO1 (args_left);
GCPRO1 (args);
do
while (CONSP (args))
{
val = Feval (Fcar (args_left));
val = Feval (XCAR (args));
if (!NILP (val))
break;
args_left = Fcdr (args_left);
args = XCDR (args);
}
while (!NILP(args_left));
UNGCPRO;
return val;
......@@ -325,24 +319,18 @@ usage: (and CONDITIONS ...) */)
(args)
Lisp_Object args;
{
register Lisp_Object val;
Lisp_Object args_left;
register Lisp_Object val = Qt;
struct gcpro gcpro1;
if (NILP(args))
return Qt;
args_left = args;
GCPRO1 (args_left);
GCPRO1 (args);
do
while (CONSP (args))
{
val = Feval (Fcar (args_left));
val = Feval (XCAR (args));
if (NILP (val))
break;
args_left = Fcdr (args_left);
args = XCDR (args);
}
while (!NILP(args_left));
UNGCPRO;
return val;
......@@ -410,22 +398,16 @@ usage: (progn BODY ...) */)
(args)
Lisp_Object args;
{
register Lisp_Object val;
Lisp_Object args_left;
register Lisp_Object val = Qnil;
struct gcpro gcpro1;
if (NILP(args))
return Qnil;
args_left = args;
GCPRO1 (args_left);
GCPRO1 (args);
do
while (CONSP (args))
{
val = Feval (Fcar (args_left));
args_left = Fcdr (args_left);
val = Feval (XCAR (args));
args = XCDR (args);
}
while (!NILP(args_left));
UNGCPRO;
return val;
......@@ -662,7 +644,7 @@ The elements can look like this:
(indent INDENT)
Set NAME's `lisp-indent-function' property to INDENT.
(edebug DEBUG)
(debug DEBUG)
Set NAME's `edebug-form-spec' property to DEBUG. (This is
equivalent to writing a `def-edebug-spec' for the macro.)
usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */)
......@@ -680,8 +662,8 @@ usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */)
doc = Qnil;
if (STRINGP (Fcar (tail)))
{
doc = Fcar (tail);
tail = Fcdr (tail);
doc = XCAR (tail);
tail = XCDR (tail);
}
while (CONSP (Fcar (tail))
......@@ -775,9 +757,9 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
if (NILP (tem))
Fset_default (sym, Feval (Fcar (tail)));
tail = Fcdr (tail);
if (!NILP (Fcar (tail)))
tem = Fcar (tail);
if (!NILP (tem))
{
tem = Fcar (tail);
if (!NILP (Vpurify_flag))
tem = Fpurecopy (tem);
Fput (sym, Qvariable_documentation, tem);
......@@ -1897,14 +1879,14 @@ un_autoload (oldqueue)
Vautoload_queue = oldqueue;
while (CONSP (queue))
{
first = Fcar (queue);
first = XCAR (queue);
second = Fcdr (first);
first = Fcar (first);
if (EQ (second, Qnil))
Vfeatures = first;
else
Ffset (first, second);
queue = Fcdr (queue);
queue = XCDR (queue);
}
return Qnil;
}
......@@ -1943,7 +1925,7 @@ do_autoload (fundef, funname)
queue = Vautoload_queue;
while (CONSP (queue))
{
first = Fcar (queue);
first = XCAR (queue);
second = Fcdr (first);
first = Fcar (first);
......@@ -1951,9 +1933,9 @@ do_autoload (fundef, funname)
may be an atom if the autoload entry was generated by a defalias
or fset. */
if (CONSP (second))
Fput (first, Qautoload, (Fcdr (second)));
Fput (first, Qautoload, (XCDR (second)));
queue = Fcdr (queue);
queue = XCDR (queue);
}
/* Once loading finishes, don't undo it. */
......@@ -2179,7 +2161,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
register Lisp_Object spread_arg;
register Lisp_Object *funcall_args;
Lisp_Object fun;
struct gcpro gcpro1;
int nvars;
fun = args [0];
funcall_args = 0;
......@@ -2219,8 +2201,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
* sizeof (Lisp_Object));
for (i = numargs; i < XSUBR (fun)->max_args;)
funcall_args[++i] = Qnil;
GCPRO1 (*funcall_args);
gcpro1.nvars = 1 + XSUBR (fun)->max_args;
nvars = 1 + XSUBR (fun)->max_args;
}
}
funcall:
......@@ -2230,8 +2211,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
{
funcall_args = (Lisp_Object *) alloca ((1 + numargs)
* sizeof (Lisp_Object));
GCPRO1 (*funcall_args);
gcpro1.nvars = 1 + numargs;
nvars = 1 + numargs;
}
bcopy (args, funcall_args, nargs * sizeof (Lisp_Object));
......@@ -2244,7 +2224,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
spread_arg = XCDR (spread_arg);
}
RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args));
return Ffuncall (nvars, funcall_args);
}
/* Run hook variables in various ways. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment