unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lektu@terra.es>
Subject: find-aliases, where-did-you-go-little-command
Date: Mon, 21 Oct 2002 13:50:20 +0200	[thread overview]
Message-ID: <20021021134029.2852.LEKTU@terra.es> (raw)

I'm thinking that it'd be nice to have a find-aliases function, more or
less like:

 (eval-when-compile
  (require 'cl))

 (defun find-aliases (function &optional ob-array)
   (let ((func (indirect-function function))
         (list nil))
     (mapatoms #'(lambda (symbol)
                   (when (eq func (ignore-errors (indirect-function symbol)))
                     (push symbol list)))
               ob-array)
     list))

(with a suitable docstring, of course) that would help find all aliases
for a function (please don't tell me there's already an easier way :)

I think it could be useful in itself, but the main reason is that I'd
like to extend where-is, or perhaps supply an alternative where-*
command, to show the keybindings for a function, *even* if I'm searching
it through an unbound alias.

After all, knowing that `hi-lock-face-buffer' is not bound to any key
does not help me find the *very same* functionality, bound to [C-x w h]
with the name `highlight-regexp'...

Any comments?


                                                           /L/e/k/t/u

             reply	other threads:[~2002-10-21 11:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-21 11:50 Juanma Barranquero [this message]
2002-10-22  3:13 ` find-aliases, where-did-you-go-little-command Richard Stallman
2002-10-22  8:46   ` Juanma Barranquero
2002-10-22 14:28     ` Stefan Monnier
2002-10-22 14:41       ` Juanma Barranquero
2002-10-23  7:12       ` Richard Stallman
2002-10-23  7:35         ` Stefan Monnier
2002-11-06 17:44   ` Juanma Barranquero
2002-11-06 19:27     ` Stefan Monnier
2002-11-06 21:49       ` Juanma Barranquero
2002-11-07  7:23         ` Kai Großjohann
2002-11-07 15:08     ` Richard Stallman
2002-11-07 16:52       ` Juanma Barranquero

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=20021021134029.2852.LEKTU@terra.es \
    --to=lektu@terra.es \
    /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).