>> +(defun xref-revert-buffer-restore-point () >> + (let ((current-line (buffer-substring-no-properties (pos-bol) (pos-eol)))) >> + (lambda () >> + (goto-char (point-min)) >> + (when (search-forward current-line) >> + (goto-char (pos-bol)))))) > > Perhaps it would make sense to save the current group as well, for > additional precision. Ok, so this is implemented here: