From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Roderick Newsgroups: gmane.emacs.help Subject: is this a bug? Date: Fri, 28 Mar 2008 21:27:48 +0000 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206740454 2940 80.91.229.12 (28 Mar 2008 21:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2008 21:40:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 28 22:41:26 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JfMK4-0002Xq-OU for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Mar 2008 22:41:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfMJT-0001DD-7B for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Mar 2008 17:40:39 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 79-65-219-39.dynamic.dsl.as9105.com Original-X-Trace: quimby.gnus.org 1206739677 7771 79.65.219.39 (28 Mar 2008 21:27:57 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Fri, 28 Mar 2008 21:27:57 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (windows-nt) Cancel-Lock: sha1:wdgFg5b76CIh9e7+eNiNHSODxFk= Original-Xref: shelby.stanford.edu gnu.emacs.help:157412 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52782 Archived-At: 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