help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: The convenient method to check/inspect/retrieve the definition/usage


From: Omar Polo
Subject: Re: The convenient method to check/inspect/retrieve the definition/usage of any commands/symbols/operators used in elisp code.
Date: Sat, 19 Jun 2021 16:48:15 +0200
User-agent: mu4e 1.4.15; emacs 28.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> Dear all,
>
> Are there any built-in method of Emacs which can let me conveniently
> check/inspect/retrieve the definition/usage of any
> commands/symbols/operators used in elisp code at-the-point/in-situ?
> Say, for the following code snippets:
>
> ;;;
>   (defun fk/company-wordfreq-toggle-language (&optional language)
>     (interactive)
>     (setq ispell-local-dictionary (or language
>                                       (if (string=
> ispell-local-dictionary "english")
>                                           "turkish"
>                                         "english")))
> [...]
>   `(progn
>     ,@(mapcar (lambda (p) `(use-package ,p))
>               packages)))
>
> (use-multiple-packages flycheck
>                        dash
>                        )
>
> [...]
> (mapcar #'straight-use-package '(flycheck lsp-mode dash ...))
>
> ;or equivalently
>
> (defvar my-package-list '(flycheck lsp-mode dash ...))
> (mapcar #'straight-use-package my-package-list)
> ;;;
>
> I want to find some convenient methods built in Emacs itself with an
> in-situ manner - by moving the point to the interest position - to
> check any commands/symbols/operators used in them.
>
> Regards

there is M-. (xref-find-definitions) that will jump to the definition of
the symbol at point (at least in emacs lisp buffers), and M-,
(xref-pop-marker-stack) to jump back.

Or you can C-h f or C-h v (describe-function/variable) and then M-n
(next-history-element) to bring in the symbol at point.



reply via email to

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