[Top][All Lists]

[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: Hongyi Zhao
Subject: Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer.
Date: Mon, 5 Jul 2021 10:44:22 +0800

On Mon, Jul 5, 2021 at 1:24 AM Daniel Martín <> wrote:
> Hongyi Zhao <> 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:

Thank you very much for your explanation.

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

This way seems cumbersome.

> - Create a buffer-local binding for xref-backend-functions in Apropos
>   buffers where you prepend elisp--xref-backend to the list.

I've read some relevant document [1], but still can't figure out how
to set this feature in my initialization file.


Assoc. Prof. Hongyi Zhao <>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China

reply via email to

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