From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Function to get defalias? Date: Mon, 23 Nov 2009 22:29:55 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1259012712 21522 80.91.229.12 (23 Nov 2009 21:45:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Nov 2009 21:45:12 +0000 (UTC) Cc: Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 23 22:45:05 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NCgiV-0005Ca-Rp for ged-emacs-devel@m.gmane.org; Mon, 23 Nov 2009 22:45:04 +0100 Original-Received: from localhost ([127.0.0.1]:49690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCgiV-0003t4-Fz for ged-emacs-devel@m.gmane.org; Mon, 23 Nov 2009 16:45:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCgUH-0006ig-LC for emacs-devel@gnu.org; Mon, 23 Nov 2009 16:30:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCgUC-0006ft-To for emacs-devel@gnu.org; Mon, 23 Nov 2009 16:30:21 -0500 Original-Received: from [199.232.76.173] (port=34212 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCgUC-0006ff-Fp for emacs-devel@gnu.org; Mon, 23 Nov 2009 16:30:16 -0500 Original-Received: from mail-gx0-f212.google.com ([209.85.217.212]:47797) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCgUC-00027b-6d for emacs-devel@gnu.org; Mon, 23 Nov 2009 16:30:16 -0500 Original-Received: by gxk4 with SMTP id 4so12747154gxk.8 for ; Mon, 23 Nov 2009 13:30:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=WbzSC88QAHLYV6XcV519qmFqtb+ghKHuz0kiBqZ49Ek=; b=kT4wnL0yyuiyCQWks283+xsoiDWJ8lHsk+XuJlMhXXyIldrsqcUHb2rBa5yZJOI5fx prZH81TOX9JQzYmJSJ+99uGVlUHsSqbswh0ua1pUN7PBi35yjvltO8fU/oPepYcnEw8q x2SFNHeIN99IgLnuRSFAlE7lP0zrslbbu5aWE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=flpZri44dMaf/M/UCj4SAOr5BNiyOGe5bQGhUtv2LELkB7CkOAYHc90E9fU2xBFNE7 4BLiZCEZJqIjqbkG2d95/e2Mxk874xzBii+VotD1f639Heboq+zrgCkVinVRvNu9PDap 0D+4/fvCcIP93bIdOdJkzFx09W/1Z1GhEPEOg= Original-Received: by 10.100.24.18 with SMTP id 18mr4320903anx.31.1259011815697; Mon, 23 Nov 2009 13:30:15 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117630 Archived-At: On Mon, Nov 23, 2009 at 10:19 PM, Stefan Monnier wrote: >> Do we have a function that does what indirect-variable does for >> variables for defalias:ed funtions? > > indirect-function? Thanks, I was probably asking for the wrong thing. I meant something like the code describe-function that shows the function symbol. I ended up stealing that code: ;;;###autoload (defun ourcomments-indirect-fun (fun) "Get the alias for function FUN if any." ;; This code is from `describe-function-1'. (when (and (symbolp fun) (functionp fun)) (let ((def (symbol-function fun))) (when (symbolp def) (while (and (fboundp def) (symbolp (symbol-function def))) (setq def (symbol-function def))) def))))