On Sat, Jun 19, 2021 at 10:48 PM Omar Polo wrote: > > > Hongyi Zhao 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), Thank you very much. But still there are some symbols can't find with this method, say, #' ,@ ' and so on. > and M-, (xref-pop-marker-stack) to jump back. I use scratch buffer to test, and it can't jump back there. > > 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. I meet the following message: M-n is undefined, as shown in the attached screenshot file. HY -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China