From 88795df55229e49777a6bf4b53bc9b7b0a6b78d5 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 5 Sep 2021 01:45:46 +0300 Subject: [PATCH] Rename xref-select-and-{goto,show}-xref * lisp/progmodes/xref.el (xref-select-and-show-xref): Rename from xref-select-and-goto-xref (bug#35376). Update all references. --- doc/emacs/maintaining.texi | 2 +- lisp/progmodes/xref.el | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index d17c6d3e757..8c5d19dcddf 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -2229,7 +2229,7 @@ With prefix argument, also bury the @file{*xref*} buffer. @item mouse-2 The same as @code{mouse-1}, but make the window displaying the @file{*xref*} buffer the selected window -(@code{xref-select-and-goto-xref}). +(@code{xref-select-and-show-xref}). @item n @itemx . diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index d495a4e2926..9045f941b13 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -898,10 +898,10 @@ beginning of the line." (defvar xref--button-map (let ((map (make-sparse-keymap))) (define-key map [mouse-1] #'xref-goto-xref) - (define-key map [mouse-2] #'xref-select-and-goto-xref) + (define-key map [mouse-2] #'xref-select-and-show-xref) map)) -(defun xref-select-and-goto-xref (event) +(defun xref-select-and-show-xref (event) "Move point to the button and show the xref definition. The window showing the xref buffer will be selected." (interactive "e") @@ -910,8 +910,9 @@ The window showing the xref buffer will be selected." (or (get-text-property (point) 'xref-item) (xref--search-property 'xref-item)) (xref-show-location-at-point)) + (define-obsolete-function-alias - 'xref--mouse-2 #'xref-select-and-goto-xref "28.1") + 'xref--mouse-2 #'xref-select-and-show-xref "28.1") (defcustom xref-truncation-width 400 "The column to visually \"truncate\" each Xref buffer line to." -- 2.39.2