How to jump back from find-tag in Emacs

emacs, etags

Solution

M-. calls `xref-find-definitions` in recent versions of Emacs. I use M-,, which is bound to `xref-pop-marker-stack`, to return back. You can even use it to recursivelly return from a deeper search.

In older Emacs versions, M-. was bound to `find-tag` which worked similarly. The inverse function was `pop-tag-mark` by default bound to M-*.

Problem

I'm using `find-tag` function M-. to jump to function definition, how can I jump back to previous location?

Original source