all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* adding xref-find-definitions support for cl-defmethods
@ 2015-08-09 13:12 Stephen Leake
  2015-08-09 13:18 ` Stephen Leake
  2015-08-09 16:24 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Leake @ 2015-08-09 13:12 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-09 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-09 13:12 adding xref-find-definitions support for cl-defmethods Stephen Leake
2015-08-09 13:18 ` Stephen Leake
2015-08-09 16:36   ` Stephen Leake
2015-08-09 16:24 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.