From 157d506dd73df15b6a80d06f3c15e4a899c4ef81 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 25 May 2019 00:15:46 +0300 Subject: [PATCH] Rename xref--revert-xref-buffer to xref-refresh-results * lisp/progmodes/xref.el (xref-refresh-results): Rename from xref--revert-xref-buffer (bug#35702). --- etc/NEWS | 5 +++++ lisp/progmodes/xref.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 064143047df..c05401ea761 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1464,6 +1464,11 @@ the new variable 'buffer-auto-revert-by-notification' to a non-nil value. Auto Revert mode can use this information to avoid polling the buffer periodically when 'auto-revert-avoid-polling' is non-nil. +** Xref + +*** Xref buffers support refreshing the search results. +A new command 'xref-refresh-results' is bound to 'g'. + * New Modes and Packages in Emacs 27.1 diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 45d2fc2fe24..b7390aa7ba3 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -695,7 +695,7 @@ references displayed in the current *xref* buffer." ;; suggested by Johan Claesson "to further reduce finger movement": (define-key map (kbd ".") #'xref-next-line) (define-key map (kbd ",") #'xref-prev-line) - (define-key map (kbd "g") #'xref--revert-xref-buffer) + (define-key map (kbd "g") #'xref-refresh-results) map)) (define-derived-mode xref--xref-buffer-mode special-mode "XREF" @@ -802,7 +802,8 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (setq xref--fetcher fetcher) (current-buffer))))) -(defun xref--revert-xref-buffer () +(defun xref-refresh-results () + "Refresh the search results in the current buffer." (interactive) (unless xref--fetcher (user-error "Reverting not supported")) -- 2.39.2