emacs-devel
[Top][All Lists]
Advanced

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

find-aliases, where-did-you-go-little-command


From: Juanma Barranquero
Subject: find-aliases, where-did-you-go-little-command
Date: Mon, 21 Oct 2002 13:50:20 +0200

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 via email to

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