>>>> Like e.g. 'quit-window' allows using a prefix argument >>>> to change its behavior by relying on (interactive "P"), >>>> xref-goto-xref should do the same: >>> >>> The proposed change is not quite the same (bury instead of kill), but if it >>> really helps, go ahead. >> I don't know how important would be to kill *xref* instead of burying. > > Indeed, probably not at all important. I'm just saying the parallel seems > very rough. > > Which might or might not be important from the standpoint of trying to > unify different behaviors in Emacs, to make them more "regular". What do you think about adding a prefix arg 'KILL' to xref-pop-marker-stack that would behave exactly like the same arg 'KILL' in quit-window? This is very useful when there is a need to quickly peek with 'M-.', and to kill the temporary buffer when going back with 'C-u M-,'. Here is the implementation: