bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is this incorrect code in elisp manual?


From: David Roderick
Subject: Re: is this incorrect code in elisp manual?
Date: Mon, 07 Apr 2008 21:18:38 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (windows-nt)

David Roderick <angel_ov_north@tiscali.co.uk> writes:

> 9.2.4 Symbol Function Indirection
> ---------------------------------
>
>  -- Function: indirect-function function &optional noerror
>      This function returns the meaning of FUNCTION as a function.  If
>      FUNCTION is a symbol, then it finds FUNCTION's function definition
>      and starts over with that value.  If FUNCTION is not a symbol,
>      then it returns FUNCTION itself.
>
>      This function signals a `void-function' error if the final symbol
>      is unbound and optional argument NOERROR is `nil' or omitted.
>      Otherwise, if NOERROR is non-`nil', it returns `nil' if the final
>      symbol is unbound.
>
>      It signals a `cyclic-function-indirection' error if there is a
>      loop in the chain of symbols.
>
>      Here is how you could define `indirect-function' in Lisp:
>
>           (defun indirect-function (function)
>             (if (symbolp function)
>                 (indirect-function (symbol-function function))
>               function))
>
>
> shouldn't this be? 
>
>           (defun indirect-function (function)
>             (if (symbolp function)
>                 (symbol-function function)
>               (function))
>
>
> -- 
> from 
> David Roderick

-- 
from 
David Roderick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]