I sometimes find useful to return to the current reference after examining its context. However, xref--next-error-function fails to jump to the current reference. The following steps reproduce the problem. emacs -Q lisp/progmodes/xref.el M-? xref-make RET n RET M-< C-u 0 M-g n I know next-error + previous-error is a workaround, but the patch fixes the bug. Thanks, Felicián