[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos
From: |
Daniel Martín |
Subject: |
Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer. |
Date: |
Sun, 04 Jul 2021 19:24:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> Say, I've the following content snippet in the Apropos buffer:
>
> !cons
> Macro: Destructive: Set CDR to the cons of CAR and CDR.
> Properties: edebug-form-spec
>
> If I put the cursor on cons, NOT !cons, and then hit `M-.', Emacs
> can't skip to the DEFUN of cons. But if I do the same operations in
> scratch buffer, it will do the trick.
>
> Any hints for this behavior shown by Emacs? And how to obtain the same
> effect in other buffers as shown in scratch buffer?
>
> Regards
It depends on the variable xref-backend-functions (which can be made
buffer-local). In general (and in Apropos buffers in particular), that
special hook only queries the Etags backend (etags--xref-backend), but
in the scratch buffer and other elisp-mode buffers it also queries the
Elisp backend (elisp--xref-backend), which uses the Emacs load history
to go to the definition.
So to have what you want, you could either:
- Generate TAGS for Emacs sources ("make tags" from a checked out Emacs
source code directory). Then M-x visit-tags-table RET
<Emacs_source_dir>/src/TAGS RET. That would also work for apropos
functions and commands that are implemented in C.
- Create a buffer-local binding for xref-backend-functions in Apropos
buffers where you prepend elisp--xref-backend to the list.
- `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Hongyi Zhao, 2021/07/03
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer.,
Daniel Martín <=
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Hongyi Zhao, 2021/07/04
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Daniel Martín, 2021/07/05
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Hongyi Zhao, 2021/07/05
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Hongyi Zhao, 2021/07/05
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Hongyi Zhao, 2021/07/05
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Emanuel Berg, 2021/07/05
- Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer., Hongyi Zhao, 2021/07/05