[Top][All Lists]

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

Re: emacs-lisp-mode and find-tag

From: Stefan Monnier
Subject: Re: emacs-lisp-mode and find-tag
Date: Fri, 20 Jun 2014 13:35:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> +1.  There was a discussion[0] about this topic last year and
> apparent agreement in principle, but the details are yet to be
> worked out.  At least two implementations exist already, one
> being the patch Leo submitted with that bug and the other being
> the `elisp-slime-nav' package I mentioned in that thread (and
> whose author has also assigned copyright).

Both of those provide navigation commands for Elisp, yes.

I'm more interested in introducing generic code, which relies on
a `find-tag-function` hook to do the work of finding the definition.

> If we do define a standard set of source navigation key bindings,
> I hope it includes one for jumping to symbols' references.  Unlike
> M-. for jumping to definitions, jumping to references doesn't seem
> to have a standard binding, even though it's often very handy.

Indeed.  In general, we need a hooks

  This should hold functions of one argument (a string): it should
  return a list of the form (BUFFER-OR-FILE POSITION NEXT) where
  POSITION can be either a position in a buffer (integer/marker) or
  a pair (LINE . COLUMN) where COLUMN can be nil.  NEXT if non-nil could
  be a function which will return the same info but for the
  next definition.  Of course both can return nil.

Then we need generic code which uses this function to provide the
M-. and M-* functionality, plus glue code for etags.el (which should get
us back the exact same functionality we have now).  Then we can start
adding more glue code for other backend: find-function, imenu, semantic,

And yes, we can add also a find-tag-definition-functions.  As well as
hooks to get a quick summary (tho we could maybe just use
eldoc-documentation-function) and another to get the "full" doc.


reply via email to

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