From: Dmitry Gutov Date: Fri, 24 May 2019 21:15:46 +0000 (+0300) Subject: Rename xref--revert-xref-buffer to xref-refresh-results X-Git-Tag: emacs-27.0.90~2800 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=157d506dd73df15b6a80d06f3c15e4a899c4ef81;p=emacs.git Rename xref--revert-xref-buffer to xref-refresh-results * lisp/progmodes/xref.el (xref-refresh-results): Rename from xref--revert-xref-buffer (bug#35702). --- 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"))