Shouldn't xref support a shorter and easier to type key sequence
‘S-M-<right> M-.’ with the following patch:
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 6b1421a6f7..6aab174bcf 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -425,7 +425,7 @@ xref--pop-to-location
(xref-location-marker (xref-item-location item))))
(buf (marker-buffer marker)))
(cl-ecase action
- ((nil) (switch-to-buffer buf))
+ ((nil) (pop-to-buffer-same-window buf))
(window (pop-to-buffer buf t))
(frame (let ((pop-up-frames t)) (pop-to-buffer buf t))))
(xref--goto-char marker))
I think so. In particular because 'xref--goto-char' does not cohabit
well with 'switch-to-buffer-preserve-window-point' in the first place.
Dmitry should consent, though.