[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consistency for xref-show-{xrefs,definitions}-function
From: |
Gabriel do Nascimento Ribeiro |
Subject: |
Re: Consistency for xref-show-{xrefs,definitions}-function |
Date: |
Sat, 16 Jan 2021 17:31:42 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>
> But you still use project-find-regexp for its "normal" purpose, too,
> right? That is, finding all occurrences of a certain regexp. Maybe to
> rename all occurrences of a symbol, etc.
>
> To only change its behavior in specific situations, you can add a new
> command to your init script and bind it to a key. The code can look
> like:
>
> (defun project-find-regexp-and-jump ()
> (interactive)
> ;; Or use a particular function name here directly.
> (let ((xref-show-xrefs-function xref-show-definitions-function))
> (call-interactively #'project-find-regexp)))
>
> Other suggestions welcome, of course.
Thanks for your suggestion! I have that function in my init.el called
'project-find-regexp-completing-read'. I started this thread just to
make sure this is not a dirty hack and the existing functions are
consistent. So I guess is everything okay =)