unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 0382fd4: xref-find-definitions: Exclude more generic function items.
       [not found] ` <E1ZPx7k-0000Xn-PT@vcs.savannah.gnu.org>
@ 2015-08-13 21:14   ` Stefan Monnier
  2015-08-14  4:33     ` Stephen Leake
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2015-08-13 21:14 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stephen Leake

> +(defcustom find-feature-regexp
> +  (concat ";;; Code:")

FWIW, I think this is overkill and marginally incorrect.
(require 'foo) is Elisp's way to "include" a file, so xref should just
jump to this file's buffer rather than to a specific location within
that file.  Just like ffap does in a #include.


        Stefan



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

* Re: [Emacs-diffs] master 0382fd4: xref-find-definitions: Exclude more generic function items.
  2015-08-13 21:14   ` [Emacs-diffs] master 0382fd4: xref-find-definitions: Exclude more generic function items Stefan Monnier
@ 2015-08-14  4:33     ` Stephen Leake
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Leake @ 2015-08-14  4:33 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> +(defcustom find-feature-regexp
>> +  (concat ";;; Code:")
>
> FWIW, I think this is overkill and marginally incorrect.
> (require 'foo) is Elisp's way to "include" a file, so xref should just
> jump to this file's buffer rather than to a specific location within
> that file.  Just like ffap does in a #include.

Yes, compatibility with ffap makes sense.

If the file is already in a buffer, it goes to the current point in that
buffer. Otherwise it goes to point-min.

That requires a change in xref--pop-to-location; it insists on going to
a marker. We'll have to introduce some flag value that means "preserve
current point". Or have the code that produces that marker set it
at the current point.

Short of that, just going to point-min is probably best.

--
-- Stephe



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

end of thread, other threads:[~2015-08-14  4:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150813182108.2057.52629@vcs.savannah.gnu.org>
     [not found] ` <E1ZPx7k-0000Xn-PT@vcs.savannah.gnu.org>
2015-08-13 21:14   ` [Emacs-diffs] master 0382fd4: xref-find-definitions: Exclude more generic function items Stefan Monnier
2015-08-14  4:33     ` Stephen Leake

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).