unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Function to get defalias?
Date: Mon, 23 Nov 2009 22:29:55 +0100	[thread overview]
Message-ID: <e01d8a50911231329j3b4bece1mded9d1b2d1f8ca85@mail.gmail.com> (raw)
In-Reply-To: <jwv6391hrbp.fsf-monnier+emacs@gnu.org>

On Mon, Nov 23, 2009 at 10:19 PM, Stefan Monnier
<monnier@iro.umontreal.ca> 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))))




      reply	other threads:[~2009-11-23 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 17:07 Function to get defalias? Lennart Borgman
2009-11-23 21:00 ` Juri Linkov
2009-11-23 21:19 ` Stefan Monnier
2009-11-23 21:29   ` Lennart Borgman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50911231329j3b4bece1mded9d1b2d1f8ca85@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).