Mercurial > emacs
diff src/eval.c @ 648:70b112526394
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 18 May 1992 08:14:41 +0000 |
parents | 63a8e7b3c547 |
children | bd574e49bfac |
line wrap: on
line diff
--- a/src/eval.c Mon May 18 08:13:37 1992 +0000 +++ b/src/eval.c Mon May 18 08:14:41 1992 +0000 @@ -465,12 +465,7 @@ that DOES eval its args. If it is a built-in function (such as load or eval-region) return nil. */ - fun = *btp->function; - while (XTYPE (fun) == Lisp_Symbol) - { - QUIT; - fun = Fsymbol_function (fun); - } + fun = Findirect_function (*btp->function); if (XTYPE (fun) == Lisp_Subr) return Qnil; /* btp points to the frame of a Lisp function that called interactive-p. @@ -1206,14 +1201,9 @@ fun = function; - /* Dereference symbols, but avoid infinte loops. Eech. */ - while (XTYPE (fun) == Lisp_Symbol) - { - if (++i > 10) return Qnil; - tem = Ffboundp (fun); - if (NILP (tem)) return Qnil; - fun = Fsymbol_function (fun); - } + fun = indirect_function (fun); + if (EQ (fun, Qunbound)) + return Qnil; /* Emacs primitives are interactive if their DEFUN specifies an interactive spec. */ @@ -1333,14 +1323,8 @@ Vautoload_queue = Qt; unbind_to (count, Qnil); - while (XTYPE (fun) == Lisp_Symbol) - { - QUIT; - val = XSYMBOL (fun)->function; - if (EQ (val, Qunbound)) - Fsymbol_function (fun); /* Get the right kind of error! */ - fun = val; - } + fun = Findirect_function (fun); + if (XTYPE (fun) == Lisp_Cons && EQ (XCONS (fun)->car, Qautoload)) error ("Autoloading failed to define function %s", @@ -1404,15 +1388,7 @@ /* At this point, only original_fun and original_args have values that will be used below */ retry: - fun = original_fun; - while (XTYPE (fun) == Lisp_Symbol) - { - QUIT; - val = XSYMBOL (fun)->function; - if (EQ (val, Qunbound)) - Fsymbol_function (fun); /* Get the right kind of error! */ - fun = val; - } + fun = Findirect_function (original_fun); if (XTYPE (fun) == Lisp_Subr) { @@ -1582,16 +1558,12 @@ numargs += nargs - 2; - while (XTYPE (fun) == Lisp_Symbol) + fun = indirect_function (fun); + if (EQ (fun, Qunbound)) { - QUIT; - fun = XSYMBOL (fun)->function; - if (EQ (fun, Qunbound)) - { - /* Let funcall get the error */ - fun = args[0]; - goto funcall; - } + /* Let funcall get the error */ + fun = args[0]; + goto funcall; } if (XTYPE (fun) == Lisp_Subr) @@ -1779,14 +1751,8 @@ retry: fun = args[0]; - while (XTYPE (fun) == Lisp_Symbol) - { - QUIT; - val = XSYMBOL (fun)->function; - if (EQ (val, Qunbound)) - Fsymbol_function (fun); /* Get the right kind of error! */ - fun = val; - } + + fun = Findirect_function (fun); if (XTYPE (fun) == Lisp_Subr) {