>> FWIW, it's was project.el's problem, not xref's. > > I thought it's the xref's problem because Help says it's in xref.el. > Typing 'C-h f project--read-regexp RET' shows: > > project--read-regexp is a Lisp function in ‘xref.el’. > > But this is because I tried to override this function in the init file: > > ;; Redefine to use `minibuffer-history': > (with-eval-after-load 'project > (defun project--read-regexp () > (let ((sym (thing-at-point 'symbol t))) > (read-regexp "Find regexp" > (and sym (regexp-quote sym)) > 'minibuffer-history)))) > > Oh, well, need to find another way to do this > (no feature request for this :-) Actually, can't do this without feature request, and can't use it as is, because never use regexp while searching in project, whereas it pollutes the regexp history for commands where I really use regexps, not just strings. A simple patch could be a saver to use with e.g. (setq project-regexp-history-variable 'minibuffer-history):