emacs-devel
[Top][All Lists]
Advanced

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

adding xref-find-definitions support for cl-defmethods


From: Stephen Leake
Subject: adding xref-find-definitions support for cl-defmethods
Date: Sun, 09 Aug 2015 08:12:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

I'd like xref-find-definitions to show all loaded cl-defmethods, as
describe-function does.

So I'm adding a function cl-generic--xref-locs to return a list of xref
locations, in cl-generic.el.

That will be called from elisp--xref-identifier-location for a new
'defgeneric type.

Can elisp-mode.el have (require 'cl-generic')? I remember some
discussion about limits on what elisp-mode.el can require, related to
preloading things. But there's nothing in the header comments about that.

If not, should I put cl-generic--xref-locs in elisp-mode (or xref?)

On the other hand, there may be other types that could be added to
xref-find-definitions, possibly by ELPA packges. So perhaps an alist of
(type . loc-function), processed in elisp--xref-find-definitions, would
be appropriate.

Actually, there's no need for the type symbol; it's only used by
elisp--xref-find-definitions and elisp--xref-identifier-location. So
that could be eliminated, and the current code restructured around a
list of loc-functions, as describe-function is with the hook
help-fns-describe-function-functions.

-- 
-- Stephe



reply via email to

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